/* Size Chart modal — themed (champagne / charcoal / ivory). */
body.jw-sizechart-open { overflow: hidden; }

.jw-sizechart[hidden] { display: none; }
.jw-sizechart {
    position: fixed; inset: 0; z-index: 100000;
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
}
.jw-sizechart__backdrop {
    position: absolute; inset: 0;
    background: rgba(26,26,26,0.72);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    animation: jwScFade 200ms var(--jw-ease, ease);
}
.jw-sizechart__dialog {
    position: relative; z-index: 1;
    width: min(720px, 100%);
    max-height: min(88vh, 900px);
    display: flex; flex-direction: column;
    background: #FAF7F2;
    border: 1px solid var(--jw-charcoal-10, rgba(26,26,26,0.08));
    border-radius: var(--jw-radius-lg, 10px);
    isolation: isolate;
    box-shadow: var(--jw-shadow-lg, 0 20px 50px rgba(26,26,26,0.10));
    overflow: hidden;
    animation: jwScPop 260ms var(--jw-ease-out, cubic-bezier(0.16,1,0.3,1));
}
.jw-sizechart__close {
    position: absolute; top: 12px; right: 12px;
    width: 40px; height: 40px;
    display: inline-flex; align-items: center; justify-content: center;
    background: #fff;
    border: 1px solid var(--jw-charcoal-10, rgba(26,26,26,0.08));
    border-radius: 50%;
    color: var(--jw-charcoal, #1A1A1A);
    cursor: pointer; line-height: 0;
    transition: all 200ms var(--jw-ease, ease);
}
.jw-sizechart__close svg { width: 18px; height: 18px; }
.jw-sizechart__close:hover { background: var(--jw-charcoal, #1A1A1A); color: #fff; border-color: var(--jw-charcoal, #1A1A1A); }

.jw-sizechart__head {
    padding: 26px 28px 16px;
    border-bottom: 1px solid var(--jw-charcoal-10, rgba(26,26,26,0.08));
    text-align: center;
}
.jw-sizechart__eyebrow {
    margin: 0 0 6px; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--jw-champagne, #B8935A); font-weight: 600;
}
.jw-sizechart__title { margin: 0; font-size: 22px; color: var(--jw-charcoal, #1A1A1A); font-weight: 600; }

.jw-sizechart__body {
    flex: 1 1 auto; min-height: 0;
    overflow: hidden;                 /* no scrollbar for images */
    padding: 22px;
    background:
        radial-gradient(circle at 30% 0%, rgba(184,147,90,0.06), transparent 60%),
        var(--jw-ivory, #FAF7F2);
    display: flex; align-items: center; justify-content: center;
}
/* Image fits fully inside the available space — no scroll. */
.jw-sizechart__img {
    max-width: 100%;
    max-height: 100%;
    width: auto; height: auto;
    object-fit: contain;
    display: block;
    border-radius: var(--jw-radius, 6px);
    box-shadow: var(--jw-shadow-md, 0 4px 20px rgba(26,26,26,0.07));
    background: #fff;
}
/* Only the PDF frame scrolls, if at all. */
.jw-sizechart__body:has(.jw-sizechart__pdf) { overflow: auto; }
.jw-sizechart__pdf { width: 100%; }
.jw-sizechart__frame {
    width: 100%; height: 62vh; min-height: 380px;
    border: 1px solid var(--jw-charcoal-10, rgba(26,26,26,0.08));
    border-radius: var(--jw-radius, 6px);
    background: #fff;
}
.jw-sizechart__empty {
    margin: 40px 0; text-align: center;
    color: var(--jw-charcoal-50, rgba(26,26,26,0.52)); font-size: 15px;
}

.jw-sizechart__foot {
    padding: 16px 22px 22px;
    border-top: 1px solid var(--jw-charcoal-10, rgba(26,26,26,0.08));
    display: flex; justify-content: center;
    background: var(--jw-ivory, #FAF7F2);
}
.jw-sizechart__download {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 26px;
    background: linear-gradient(135deg, var(--jw-champagne-l, #D4B080) 0%, var(--jw-champagne, #B8935A) 55%, var(--jw-champagne-d, #9A7A47) 100%);
    color: #fff !important; text-decoration: none;
    font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600;
    border-radius: var(--jw-radius-pill, 999px);
    box-shadow: 0 4px 14px rgba(184,147,90,0.30);
    transition: transform 180ms var(--jw-ease, ease), box-shadow 180ms var(--jw-ease, ease), filter 180ms var(--jw-ease, ease);
}
.jw-sizechart__download svg { width: 18px; height: 18px; }
.jw-sizechart__download:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(184,147,90,0.38); filter: brightness(1.03); }

@keyframes jwScFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes jwScPop { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }

@media (max-width: 600px) {
    .jw-sizechart { padding: 12px; }
    .jw-sizechart__head { padding: 22px 20px 14px; }
    .jw-sizechart__title { font-size: 19px; }
    .jw-sizechart__body { padding: 16px; }
    .jw-sizechart__frame { height: 66vh; }
}
