/* WC Size Charts — Frontend Styles */

/* ── Button ── */
.wcsc-button-wrap {
    margin: 12px 0;
    display: inline-block;
}
.wcsc-open-popup {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    transition: opacity .2s, transform .15s;
}
.wcsc-open-popup:hover  { opacity: .88; transform: translateY(-1px); }
.wcsc-open-popup:active { transform: translateY(0); opacity: 1; }
.wcsc-btn-icon svg { display: block; }

/* ── Inner tabs (popup with multiple charts) ── */
.wcsc-inner-tabs { margin: 0; }
.wcsc-inner-tab-nav {
    display: flex;
    gap: 4px;
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
    border-bottom: 2px solid #e0e0e0;
}
.wcsc-inner-tab-nav li { margin: 0; }
.wcsc-inner-tab-nav li a {
    display: block;
    padding: 8px 16px;
    color: #555;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-size: 14px;
    font-weight: 500;
    transition: color .15s, border-color .15s;
}
.wcsc-inner-tab-nav li.active a,
.wcsc-inner-tab-nav li a:hover {
    color: #0073aa;
    border-bottom-color: #0073aa;
}

/* ── Chart content ── */
.wcsc-chart-content { padding: 8px 0; }
.wcsc-chart-image { max-width: 100%; height: auto; display: block; margin: 0 auto; }

/* ── Overlay ── */
.wcsc-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 999990;
    overflow-y: auto;
    padding: 20px;
}
.wcsc-overlay.is-open { display: flex; align-items: flex-start; justify-content: center; }

/* ── Popup container ── */
.wcsc-popup-container {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
    width: 100%;
    max-width: 820px;
    position: relative;
    overflow: hidden;
}

/* Positions */
.wcsc-overlay.wcsc-pos-center    { align-items: center; }
.wcsc-overlay.wcsc-pos-top       { align-items: flex-start; }
.wcsc-overlay.wcsc-pos-bottom    { align-items: flex-end; }
.wcsc-overlay.wcsc-pos-top-left  { align-items: flex-start; justify-content: flex-start; }
.wcsc-overlay.wcsc-pos-top-right { align-items: flex-start; justify-content: flex-end; }
.wcsc-overlay.wcsc-pos-bottom-left  { align-items: flex-end; justify-content: flex-start; }
.wcsc-overlay.wcsc-pos-bottom-right { align-items: flex-end; justify-content: flex-end; }

/* ── Popup header ── */
.wcsc-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid #f0f0f0;
    background: #fafafa;
}
.wcsc-popup-title { margin: 0; font-size: 16px; font-weight: 700; }
.wcsc-popup-close {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #888;
    padding: 0 4px;
    transition: color .15s;
}
.wcsc-popup-close:hover { color: #222; }

/* ── Popup body ── */
.wcsc-popup-body {
    padding: 24px;
    max-height: 80vh;
    overflow-y: auto;
}

/* ── Animations ── */

/* Fade */
@keyframes wcsc-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.wcsc-anim-fade { animation: wcsc-fade-in .25s ease-out both; }

/* Slide Down */
@keyframes wcsc-slide-in {
    from { opacity: 0; transform: translateY(-30px); }
    to   { opacity: 1; transform: translateY(0); }
}
.wcsc-anim-slide { animation: wcsc-slide-in .3s ease-out both; }

/* Zoom */
@keyframes wcsc-zoom-in {
    from { opacity: 0; transform: scale(.85); }
    to   { opacity: 1; transform: scale(1); }
}
.wcsc-anim-zoom { animation: wcsc-zoom-in .25s cubic-bezier(.34,1.56,.64,1) both; }

/* Bounce */
@keyframes wcsc-bounce-in {
    0%   { opacity: 0; transform: scale(.6); }
    60%  { opacity: 1; transform: scale(1.06); }
    80%  { transform: scale(.97); }
    100% { transform: scale(1); }
}
.wcsc-anim-bounce { animation: wcsc-bounce-in .4s both; }

/* Flip */
@keyframes wcsc-flip-in {
    from { opacity: 0; transform: perspective(600px) rotateX(-30deg); }
    to   { opacity: 1; transform: perspective(600px) rotateX(0deg); }
}
.wcsc-anim-flip { animation: wcsc-flip-in .35s ease-out both; }

/* Rotate */
@keyframes wcsc-rotate-in {
    from { opacity: 0; transform: rotate(-8deg) scale(.9); }
    to   { opacity: 1; transform: rotate(0deg) scale(1); }
}
.wcsc-anim-rotate { animation: wcsc-rotate-in .3s ease-out both; }

/* None */
.wcsc-anim-none { animation: none; }

/* ── Responsive ── */
@media (max-width: 600px) {
    .wcsc-popup-container { max-width: 100%; border-radius: 6px; }
    .wcsc-popup-body { max-height: 70vh; }
}
