/* ============================================================
   WC Withdrawal Right – Frontend Styles
   ============================================================ */

/* ── Button ──────────────────────────────────────────────── */
.wcwr-button-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 12px 0;
}

.wcwr-button-wrapper .wcwr-open-modal {
    background: #1e3a5f;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 9px 18px;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}

.wcwr-button-wrapper .wcwr-open-modal:hover {
    background: #2c5282;
    color: #fff;
}

.wcwr-icon { font-size: 16px; }

.wcwr-days-notice {
    font-size: 12px;
    color: #e67e22;
    font-style: italic;
}

.wcwr-thankyou-notice {
    margin-top: 20px;
}

/* ── Modal Overlay ───────────────────────────────────────── */
.wcwr-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.wcwr-modal-overlay[hidden] { display: none; }

.wcwr-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 999998;
}

.wcwr-modal-backdrop[hidden] { display: none; }

.wcwr-modal-box {
    position: relative;
    z-index: 999999;
    background: #fff;
    border-radius: 10px;
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    animation: wcwr-slide-in .2s ease;
}

@keyframes wcwr-slide-in {
    from { transform: translateY(-20px); opacity: 0; }
    to   { transform: translateY(0);     opacity: 1; }
}

/* ── Modal Header ────────────────────────────────────────── */
.wcwr-modal-header {
    background: #1e3a5f;
    padding: 18px 24px;
    border-radius: 10px 10px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wcwr-modal-header h2 {
    margin: 0;
    color: #fff;
    font-size: 17px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wcwr-modal-icon { font-size: 20px; }

.wcwr-modal-close {
    background: transparent;
    border: none;
    color: #a8c4e0;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
    transition: color .15s;
}

.wcwr-modal-close:hover { color: #fff; }

/* ── Steps Indicator ─────────────────────────────────────── */
.wcwr-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 24px 0;
    gap: 0;
}

.wcwr-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    opacity: .4;
    transition: opacity .2s;
}

.wcwr-step--active { opacity: 1; }
.wcwr-step--done   { opacity: .7; }

.wcwr-step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: bold;
    transition: background .2s, color .2s;
}

.wcwr-step--active .wcwr-step-number { background: #1e3a5f; color: #fff; }
.wcwr-step--done   .wcwr-step-number { background: #27ae60; color: #fff; }

.wcwr-step-label {
    font-size: 11px;
    color: #555;
    text-align: center;
    white-space: nowrap;
}

.wcwr-step-divider {
    flex: 1;
    height: 2px;
    background: #e0e0e0;
    margin: 0 6px;
    margin-bottom: 18px;
}

/* ── Step Content ────────────────────────────────────────── */
.wcwr-step-content {
    padding: 20px 24px 24px;
}

.wcwr-step-content[hidden] { display: none; }

/* ── Info Box ────────────────────────────────────────────── */
.wcwr-info-box {
    background: #eaf4ff;
    border-left: 4px solid #1e3a5f;
    border-radius: 4px;
    padding: 12px 14px;
    margin-bottom: 18px;
}

.wcwr-info-text {
    margin: 0;
    font-size: 13px;
    color: #2c5282;
    line-height: 1.5;
}

/* ── Order Preview Table ─────────────────────────────────── */
.wcwr-order-preview h3 {
    font-size: 14px;
    margin: 0 0 8px;
    color: #333;
}

.wcwr-order-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-bottom: 14px;
}

.wcwr-order-table td {
    padding: 5px 8px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: top;
}

.wcwr-order-table td:first-child {
    color: #666;
    width: 140px;
    font-weight: 500;
}

.wcwr-items-list {
    margin: 6px 0 0;
    padding-left: 18px;
    font-size: 13px;
    color: #555;
    line-height: 1.7;
}

/* ── Fields ──────────────────────────────────────────────── */
.wcwr-field-group {
    margin-top: 16px;
}

.wcwr-field-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.wcwr-required { color: #e74c3c; }

.wcwr-field-group textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
    font-size: 13px;
    resize: vertical;
    font-family: inherit;
    transition: border-color .15s;
}

.wcwr-field-group textarea:focus {
    outline: none;
    border-color: #1e3a5f;
    box-shadow: 0 0 0 2px rgba(30,58,95,.15);
}

/* ── GDPR ────────────────────────────────────────────────── */
.wcwr-gdpr { margin-top: 14px; }

.wcwr-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    color: #555;
    font-weight: normal !important;
    cursor: pointer;
}

.wcwr-checkbox-label input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
}

/* ── Actions ─────────────────────────────────────────────── */
.wcwr-modal-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 22px;
    gap: 10px;
}

.wcwr-modal-actions.wcwr-center {
    justify-content: center;
}

.wcwr-btn-primary {
    background: #1e3a5f !important;
    color: #fff !important;
    border-color: #1e3a5f !important;
    padding: 10px 22px !important;
    border-radius: 5px !important;
}

.wcwr-btn-primary:hover {
    background: #2c5282 !important;
    border-color: #2c5282 !important;
}

.wcwr-btn-danger {
    background: #c0392b !important;
    border-color: #c0392b !important;
}

.wcwr-btn-danger:hover {
    background: #a93226 !important;
    border-color: #a93226 !important;
}

.wcwr-btn-secondary {
    background: transparent;
    color: #555;
    border: 1px solid #ccc;
    padding: 10px 18px;
    border-radius: 5px;
    cursor: pointer;
}

/* ── Confirm Box ─────────────────────────────────────────── */
.wcwr-confirm-box {
    text-align: center;
    padding: 10px 0;
}

.wcwr-confirm-icon { font-size: 48px; margin-bottom: 10px; }

.wcwr-confirm-box h3 { margin: 0 0 12px; color: #e67e22; }

.wcwr-confirm-order { font-size: 18px; margin: 12px 0; }

.wcwr-confirm-note { font-size: 13px; color: #777; }

/* ── Success Box ─────────────────────────────────────────── */
.wcwr-success-box { text-align: center; }

.wcwr-success-icon { font-size: 52px; margin-bottom: 12px; }

.wcwr-success-box h3 { color: #27ae60; margin: 0 0 16px; }

.wcwr-success-note { font-size: 13px; color: #666; margin-top: 14px; }

/* ── Loading Overlay ─────────────────────────────────────── */
.wcwr-loading {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    gap: 12px;
    font-size: 14px;
    color: #555;
}

.wcwr-loading[hidden] { display: none; }

.wcwr-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e0e0e0;
    border-top-color: #1e3a5f;
    border-radius: 50%;
    animation: wcwr-spin 0.7s linear infinite;
}

@keyframes wcwr-spin { to { transform: rotate(360deg); } }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 480px) {
    .wcwr-modal-box { border-radius: 8px; }
    .wcwr-step-label { display: none; }
    .wcwr-modal-actions { flex-direction: column-reverse; }
    .wcwr-btn-primary, .wcwr-btn-secondary { width: 100%; text-align: center; }
}

/* ── NEW: Countdown ──────────────────────────────────────── */
.wcwr-countdown-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff8e1;
    border: 1px solid #f0d080;
    border-radius: 6px;
    padding: 10px 16px;
    margin-bottom: 16px;
}

.wcwr-countdown-label { font-size: 13px; color: #555; }

.wcwr-countdown-timer {
    font-size: 20px;
    font-weight: bold;
    font-family: monospace;
    letter-spacing: 1px;
}

/* ── NEW: Refund/Type radio options ──────────────────────── */
.wcwr-option-group { margin-bottom: 18px; }

.wcwr-option-group h3 {
    font-size: 14px;
    margin: 0 0 10px;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 6px;
}

.wcwr-radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    margin-bottom: 8px;
    transition: border-color .15s, background .15s;
}

.wcwr-radio-label:hover { border-color: var(--wcwr-primary, #1e3a5f); background: #f8f9fc; }

.wcwr-radio-label input[type="radio"] { accent-color: var(--wcwr-primary, #1e3a5f); }

/* ── NEW: Partial items ──────────────────────────────────── */
.wcwr-item-row {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 8px;
    background: #fff;
}

.wcwr-item-row.wcwr-item-excluded {
    background: #fdf2f2;
    border-color: #f5c6c6;
    opacity: .8;
}

.wcwr-item-row label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: normal !important;
}

.wcwr-item-name { flex: 1; font-size: 14px; color: #333; }

.wcwr-item-total { font-size: 13px; color: #888; }

.wcwr-item-qty-wrapper {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
    font-size: 13px;
    color: #555;
}

.wcwr-item-qty-wrapper input[type="number"] {
    width: 70px;
    padding: 5px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    margin: 0 6px;
}

.wcwr-item-max { color: #999; font-size: 12px; }

.wcwr-excluded-msg {
    font-size: 12px;
    color: #e74c3c;
    margin: 6px 0 0;
    padding: 4px 8px;
    background: #fff5f5;
    border-radius: 3px;
}

/* ── NEW: Confirm summary ────────────────────────────────── */
.wcwr-confirm-summary {
    text-align: left;
    margin: 12px 0;
}

/* ── NEW: Guest form ─────────────────────────────────────── */
.wcwr-guest-wrapper { max-width: 500px; margin: 0 auto; }

.wcwr-guest-wrapper .wcwr-field-group { margin-bottom: 16px; }

.wcwr-guest-wrapper label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 14px;
}

.wcwr-guest-wrapper input[type="text"],
.wcwr-guest-wrapper input[type="email"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    box-sizing: border-box;
}

.wcwr-error-box {
    background: #fdf2f2;
    border: 1px solid #f5c6c6;
    color: #c0392b;
    padding: 10px 14px;
    border-radius: 5px;
    font-size: 14px;
    margin-bottom: 14px;
}

/* ── NEW: My Account badge ───────────────────────────────── */
.wcwr-menu-badge {
    background: #c0392b;
    color: #fff;
    border-radius: 10px;
    padding: 1px 7px;
    font-size: 11px;
    margin-left: 4px;
    vertical-align: middle;
}
