/* ── WooCommerce Custom Size Addon ─────────────────────────────── */

#wcsa-custom-wrap,
#wcsa-custom-wrap *,
#wcsa-modal-overlay,
#wcsa-modal-overlay * {
    font-family: 'Instrument Sans', sans-serif;
}

/* Wrapper hidden by default */
#wcsa-custom-wrap {
    margin-top: 20px;
}

/* Action buttons row */
.wcsa-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 16px;
}

.wcsa-btn {
    padding: 11px 24px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    letter-spacing: 0.3px;
    transition: all 0.2s ease;
    outline: none;
}

.wcsa-btn-dark {
    background: #333;
    border: 1.5px solid #333;
    color: #fff;
}

.wcsa-btn-dark:hover {
    background: #000;
    border-color: #000;
}



/* Saved badge */
#wcsa-saved-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #edfaf0;
    border: 1px solid #b2dfbc;
    border-radius: 8px;
    padding: 9px 16px;
    margin-top: 8px;
}

.wcsa-badge {
    font-size: 13px;
    font-weight: 600;
    color: #1b6b30;
}

.wcsa-link {
    font-size: 13px;
    color: #555;
    text-decoration: underline;
}

/* ── Modal ──────────────────────────────────────────────────── */
#wcsa-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

#wcsa-modal-box {
    background: #fff;
    border-radius: 14px;
    width: 95%;
    max-width: 820px;
    max-height: 92vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .25);
}

#wcsa-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 22px 26px 18px;
    border-bottom: 1px solid #f0f0f0;
}

#wcsa-modal-head h3 {
    margin: 0 0 4px;
    font-size: 19px;
    font-weight: 700;
    color: #111;
}

#wcsa-modal-head p {
    margin: 0;
    font-size: 13px;
    color: #888;
}

#wcsa-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #999;
    padding: 0;
    margin-left: 12px;
}

#wcsa-modal-close:hover {
    color: #000;
}

/* Step tabs */
#wcsa-modal-steps {
    display: flex;
    border-bottom: 2px solid #f0f0f0;
    padding: 0 26px;
}

.wcsa-step {
    padding: 12px 6px;
    margin-right: 30px;
    font-size: 13px;
    font-weight: 600;
    color: #bbb;
    cursor: default;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.wcsa-step.active {
    color: #111;
    border-bottom-color: #333;
}

/* Modal body */
#wcsa-modal-body {
    overflow-y: auto;
    flex: 1;
    padding: 24px 26px;
}

/* Measurement layout */
.wcsa-measure-grid {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.wcsa-fields {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.wcsa-field label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: #999;
    margin-bottom: 5px;
}

.wcsa-field-input {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 7px;
    overflow: hidden;
}

.wcsa-field-input input {
    flex: 1;
    padding: 9px 12px;
    border: none;
    outline: none;
    font-size: 14px;
    font-family: inherit;
    width: 100%;
}

.wcsa-field-input span {
    padding: 0 10px;
    font-size: 12px;
    color: #aaa;
    background: #f7f7f7;
    border-left: 1px solid #ddd;
    height: 100%;
    display: flex;
    align-items: center;
}

.wcsa-guide {
    flex: 0 0 200px;
    position: sticky;
    top: 0;
}

.wcsa-guide img {
    width: 100%;
    border-radius: 8px;
    display: block;
    opacity: 0.85;
}

/* Modal action buttons */
.wcsa-modal-btn {
    display: block;
    width: 100%;
    margin-top: 20px;
    padding: 13px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.wcsa-modal-btn:hover {
    background: #000;
}

.wcsa-outline-btn {
    background: transparent;
    color: #333;
    border: 1.5px solid #333;
}

.wcsa-outline-btn:hover {
    background: #333;
    color: #fff;
}

.wcsa-modal-btns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.wcsa-modal-btns .wcsa-modal-btn {
    display: block;
}

/* Responsive */
@media (max-width: 600px) {

    .wcsa-form-grid,
    .wcsa-fields {
        grid-template-columns: 1fr;
    }

    .wcsa-measure-grid {
        flex-direction: column;
    }

    .wcsa-guide {
        flex: none;
        width: 100%;
    }

    .wcsa-modal-btns {
        grid-template-columns: 1fr;
    }
}