/* =====================================================
   Offer DSC Plugin – Frontend Popup Styles
   ===================================================== */

/* ─── Open Button ──────────────────────────────────── */
.odsc-open-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 28px;
    background: #6D33AA;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: inherit;
}
.odsc-open-btn:hover {
    background: #016297;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(109, 51, 170, 0.35);
}
.odsc-open-btn:active {
    transform: translateY(0);
}

/* ─── Modal Overlay ────────────────────────────────── */
.odsc-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 99999;
    overflow-y: auto;
    padding: 20px;
}
.odsc-modal-overlay.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

/* ─── Modal Content ────────────────────────────────── */
.odsc-modal-content {
    background: #fff;
    border-radius: 14px;
    padding: 40px;
    max-width: 860px;
    width: 100%;
    margin: 30px auto;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.22);
    position: relative;
    animation: odscSlideIn 0.3s ease-out;
}
@keyframes odscSlideIn {
    from { opacity: 0; transform: translateY(-24px); }
    to   { opacity: 1; transform: translateY(0); }
}

.odsc-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 34px;
    height: 34px;
    background: #f1f1f1;
    border: none;
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    transition: background 0.2s;
}
.odsc-modal-close:hover {
    background: #e0e0e0;
}

/* ─── Modal Header ─────────────────────────────────── */
.odsc-modal-header {
    text-align: center;
    margin-bottom: 28px;
}
.odsc-modal-header h2 {
    font-size: 26px;
    font-weight: 700;
    color: #2a2728;
    margin: 0 0 6px;
}
.odsc-modal-header p {
    color: #6b7280;
    font-size: 14px;
    margin: 0;
}

/* ─── Error message ─────────────────────────────────── */
.odsc-error-msg {
    background: #fff5f5;
    color: #c53030;
    border: 1px solid #feb2b2;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

/* ─── Form Sections ─────────────────────────────────── */
.odsc-section {
    margin-bottom: 24px;
}
.odsc-section-title {
    font-size: 16px;
    font-weight: 700;
    color: #2a2728;
    margin: 0 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f0;
}
.odsc-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ─── Form Fields ───────────────────────────────────── */
.odsc-field {
    display: flex;
    flex-direction: column;
}
.odsc-field label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}
.odsc-field input,
.odsc-field select,
.odsc-field textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 7px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    color: #1f2937;
    transition: border-color 0.25s, box-shadow 0.25s;
    box-sizing: border-box;
}
.odsc-field input:focus,
.odsc-field select:focus,
.odsc-field textarea:focus {
    border-color: #6D33AA;
    box-shadow: 0 0 0 3px rgba(109, 51, 170, 0.12);
    outline: none;
}
.odsc-field textarea {
    resize: vertical;
    min-height: 80px;
}
.odsc-note {
    font-size: 11px;
    color: #9ca3af;
    font-style: italic;
    margin-top: 4px;
}

/* ─── Fast Delivery Box ─────────────────────────────── */
.odsc-fast-delivery-box {
    margin-top: 12px;
    background: #fffbeb;
    border: 1px solid #fbbf24;
    border-radius: 8px;
    padding: 14px;
    animation: odscFadeIn 0.3s ease;
}
@keyframes odscFadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.odsc-fast-delivery-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}
.odsc-fast-delivery-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: #f59e0b;
    flex-shrink: 0;
}
.odsc-fast-delivery-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.odsc-fast-delivery-text strong {
    font-size: 14px;
    color: #92400e;
}
.odsc-fast-delivery-text small {
    font-size: 12px;
    color: #b45309;
}

/* ─── Same as billing checkbox ──────────────────────── */
.odsc-checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: #f9fafb;
    border-radius: 8px;
    margin: 4px 0 20px;
    cursor: pointer;
}
.odsc-checkbox-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #6D33AA;
}
.odsc-checkbox-row label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
}

/* ─── Shipping Info ─────────────────────────────────── */
.odsc-shipping-info {
    background: #f3f4f6;
    border-radius: 8px;
    padding: 14px 16px;
    margin: 8px 0 20px;
    font-size: 13px;
    color: #4b5563;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.odsc-shipping-info i {
    color: #6D33AA;
    flex-shrink: 0;
    margin-top: 2px;
}

/* ─── KYC WhatsApp Box ───────────────────────────────── */
.odsc-kyc-box {
    background: #f0fff4;
    border: 1px solid #9ae6b4;
    border-radius: 8px;
    padding: 16px;
    margin: 8px 0 20px;
}
.odsc-kyc-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}
.odsc-kyc-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: #38a169;
    flex-shrink: 0;
}
.odsc-kyc-label span {
    font-size: 14px;
    color: #276749;
    line-height: 1.5;
}
.odsc-kyc-label span strong {
    display: block;
    font-weight: 700;
    margin-bottom: 2px;
}
.odsc-kyc-label small {
    font-size: 12px;
    color: #2f855a;
    font-style: italic;
}

/* ─── Order Summary ─────────────────────────────────── */
.odsc-order-summary {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 20px;
    margin: 12px 0 20px;
}
.odsc-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 15px;
    color: #4b5563;
    border-bottom: 1px solid #e5e7eb;
}
.odsc-summary-row:last-child {
    border-bottom: none;
}
.odsc-summary-row strong {
    font-weight: 600;
    color: #1f2937;
}
.odsc-summary-total {
    font-size: 18px;
    font-weight: 700;
    color: #6D33AA !important;
    padding-top: 14px;
    margin-top: 6px;
    border-top: 2px dashed #d1d5db;
}
.odsc-summary-total span,
.odsc-summary-total strong {
    color: #6D33AA !important;
}

/* ─── Submit button ─────────────────────────────────── */
.odsc-submit-btn {
    width: 100%;
    padding: 16px 32px;
    background: #6D33AA;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: inherit;
}
.odsc-submit-btn:hover {
    background: #5a2790;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(109, 51, 170, 0.3);
}
.odsc-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}
.odsc-secure-note {
    text-align: center;
    font-size: 12px;
    color: #9ca3af;
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

/* ─── Status Pages ───────────────────────────────────── */
.odsc-status-page {
    max-width: 680px;
    margin: 40px auto;
    text-align: center;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}
.odsc-status-icon {
    font-size: 72px;
    line-height: 1;
    margin-bottom: 16px;
}
.odsc-icon-success { color: #38a169; }
.odsc-icon-fail    { color: #e53e3e; }

.odsc-status-page h1 {
    font-size: 32px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 10px;
}
.odsc-status-sub {
    font-size: 16px;
    color: #718096;
    margin-bottom: 28px;
}
.odsc-status-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 24px;
    margin: 24px auto;
    text-align: left;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.odsc-status-card h3 {
    font-size: 16px;
    font-weight: 700;
    color: #2d3748;
    margin: 0 0 14px;
}
.odsc-detail-table {
    width: 100%;
    border-collapse: collapse;
}
.odsc-detail-table td,
.odsc-detail-table th {
    padding: 8px 10px;
    font-size: 14px;
    border-bottom: 1px solid #edf2f7;
    text-align: left;
}
.odsc-detail-table td:first-child,
.odsc-detail-table th:first-child {
    color: #718096;
    font-weight: 600;
    width: 44%;
}

/* KYC Reminder Block */
.odsc-kyc-reminder {
    background: #f0fff4;
    border: 1px solid #9ae6b4;
    border-radius: 10px;
    padding: 24px;
    margin: 24px auto;
    text-align: left;
}
.odsc-kyc-reminder h3 {
    font-size: 16px;
    font-weight: 700;
    color: #276749;
    margin: 0 0 10px;
}
.odsc-kyc-reminder p {
    font-size: 14px;
    color: #2f855a;
    margin-bottom: 10px;
}
.odsc-kyc-reminder ul {
    padding-left: 20px;
    margin-bottom: 16px;
}
.odsc-kyc-reminder ul li {
    font-size: 14px;
    color: #2f855a;
    margin-bottom: 4px;
}

.odsc-wa-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #25D366;
    color: #fff;
    padding: 11px 22px;
    border-radius: 7px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    transition: background 0.2s;
}
.odsc-wa-btn:hover {
    background: #1fab55;
    color: #fff;
}

.odsc-fail-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 24px 0;
}
.odsc-retry-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #6D33AA;
    color: #fff;
    padding: 11px 22px;
    border-radius: 7px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    transition: background 0.2s;
}
.odsc-retry-btn:hover {
    background: #5a2790;
    color: #fff;
}

.odsc-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}
.odsc-badge-paid    { background: #c6f6d5; color: #276749; }
.odsc-badge-fail    { background: #fed7d7; color: #9b2c2c; }
.odsc-badge-pending { background: #fefcbf; color: #975a16; }

.odsc-contact-note {
    font-size: 13px;
    color: #718096;
    margin-top: 20px;
}
.odsc-contact-note a {
    color: #6D33AA;
    text-decoration: none;
}

/* ─── Responsive ─────────────────────────────────────── */
@media (max-width: 640px) {
    .odsc-modal-content {
        padding: 28px 16px;
        margin: 10px;
        border-radius: 10px;
    }
    .odsc-grid-2 {
        grid-template-columns: 1fr;
    }
    .odsc-modal-header h2 {
        font-size: 20px;
    }
    .odsc-status-page {
        padding: 24px 16px;
    }
    .odsc-status-page h1 {
        font-size: 24px;
    }
    .odsc-fail-actions {
        flex-direction: column;
        align-items: center;
    }
}