/**
 * Woo Size Chart – Frontend styles (premium-style)
 */
:root {
    --wsc-primary: #2271b1;
    --wsc-primary-hover: #135e96;
    --wsc-remove: #d63638;
}

/* Link: base (icon left, flex) */
.wsc-link-wrap {
    margin: 0.75em 0;
}
.wsc-link-wrap .wsc-open {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    text-decoration: none;
    font-size: 0.95em;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, color 0.2s, box-shadow 0.2s;
}
.wsc-link-wrap .wsc-open .dashicons {
    font-size: 1.15em;
    width: 1.15em;
    height: 1.15em;
    flex-shrink: 0;
}

/* Style: Button (outline) */
.wsc-link-wrap.wsc-style-button .wsc-open {
    padding: 0.5em 1em;
    border: 1px solid var(--wsc-primary);
    border-radius: 4px;
    background: #fff;
    color: var(--wsc-primary);
}
.wsc-link-wrap.wsc-style-button .wsc-open:hover {
    background: #f0f6fc;
    border-color: var(--wsc-primary-hover);
    color: var(--wsc-primary-hover);
}

/* Style: Text with icon on left (still clearly a button) */
.wsc-link-wrap.wsc-style-text_icon .wsc-open {
    padding: 0.4em 0.6em;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: var(--wsc-primary);
    font-weight: 500;
}
.wsc-link-wrap.wsc-style-text_icon .wsc-open:hover {
    background: rgba(34, 113, 177, 0.08);
    color: var(--wsc-primary-hover);
    text-decoration: underline;
}
.wsc-link-wrap.wsc-style-text_icon .wsc-open:focus {
    outline: 2px solid var(--wsc-primary);
    outline-offset: 2px;
}

/* Modal: overlay & container */
.wsc-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 20px;
    box-sizing: border-box;
}
.wsc-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    opacity: 0;
    transition: opacity 0.25s ease;
}
.wsc-modal.wsc-modal-visible .wsc-backdrop {
    opacity: 1;
}
.wsc-content-wrap {
    position: relative;
    background: #fff;
    max-width: 900px;
    width: 100%;
    max-height: calc(100vh - 40px);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    transform: scale(0.92);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
}
.wsc-modal.wsc-modal-visible .wsc-content-wrap {
    transform: scale(1);
    opacity: 1;
}
.wsc-modal.wsc-modal-closing .wsc-content-wrap {
    transform: scale(0.96);
    opacity: 0;
}

/* Modal header */
.wsc-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid #dcdcde;
    flex-shrink: 0;
}
.wsc-modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1d2327;
}
.wsc-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #646970;
    cursor: pointer;
    border-radius: 4px;
    font-size: 24px;
    line-height: 1;
    transition: color 0.2s, background 0.2s;
}
.wsc-close:hover,
.wsc-close:focus {
    color: #fff;
    background: var(--wsc-remove);
    outline: none;
}

/* Modal body: scrollable */
.wsc-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}
.wsc-modal-body img.wsc-modal-img {
    width: 100%;
    height: auto;
    display: block;
}

.wsc-modal-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 120px;
    color: #646970;
}
.wsc-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 2px solid #dcdcde;
    border-top-color: var(--wsc-primary);
    border-radius: 50%;
    animation: wsc-spin 0.7s linear infinite;
}
@keyframes wsc-spin {
    to { transform: rotate(360deg); }
}

/* Body scroll lock when modal open */
body.wsc-modal-open {
    overflow: hidden;
}
