/**
 * NEXUS Property OS - Payment Gateway Styles
 * Luxury Arabic Design with Multi-Payment Support
 */

/* ============================================
   PAYMENT METHODS CONTAINER
   ============================================ */

.payment-methods-container {
    background: linear-gradient(135deg, rgba(26, 41, 66, 0.95), rgba(10, 22, 40, 0.98));
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.payment-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.payment-title i {
    color: var(--gold-primary, #D4AF37);
}

/* ============================================
   PAYMENT METHODS GRID
   ============================================ */

.payment-methods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.payment-method-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(26, 41, 66, 0.6);
    border: 2px solid rgba(212, 175, 55, 0.15);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    width: 100%;
}

[dir="rtl"] .payment-method-btn {
    text-align: right;
    flex-direction: row-reverse;
}

.payment-method-btn:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: rgba(212, 175, 55, 0.4);
    transform: translateY(-2px);
}

.payment-method-btn.selected {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(0, 212, 170, 0.1));
    border-color: var(--gold-primary, #D4AF37);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
}

.payment-method-btn.recommended {
    border-color: rgba(0, 212, 170, 0.4);
}

/* Payment Method Icon */
.payment-method-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(0, 212, 170, 0.1));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.payment-method-icon i {
    font-size: 1.5rem;
    color: var(--gold-primary, #D4AF37);
}

/* Payment Method Info */
.payment-method-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.payment-method-name {
    font-weight: 600;
    color: #fff;
    font-size: 1rem;
}

.payment-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: fit-content;
}

.payment-badge.recommended {
    background: linear-gradient(135deg, var(--teal-accent, #00D4AA), #00a88a);
    color: #0A1628;
}

.payment-badge.qr {
    background: rgba(0, 212, 170, 0.2);
    color: var(--teal-accent, #00D4AA);
    border: 1px solid rgba(0, 212, 170, 0.3);
}

/* Payment Method Check */
.payment-method-check {
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s ease;
}

.payment-method-check i {
    font-size: 1.5rem;
    color: var(--teal-accent, #00D4AA);
}

.payment-method-btn.selected .payment-method-check {
    opacity: 1;
    transform: scale(1);
}

/* ============================================
   PAYMENT SECURITY BADGE
   ============================================ */

.payment-security {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(0, 212, 170, 0.1);
    border: 1px solid rgba(0, 212, 170, 0.2);
    border-radius: 10px;
    color: var(--teal-accent, #00D4AA);
    font-size: 0.9rem;
    font-weight: 500;
}

.payment-security i {
    font-size: 1.1rem;
}

/* ============================================
   QR CODE PAYMENT MODAL
   ============================================ */

.qr-payment-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 22, 40, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.qr-payment-modal.active {
    opacity: 1;
    visibility: visible;
}

.qr-payment-content {
    background: linear-gradient(135deg, rgba(26, 41, 66, 0.98), rgba(10, 22, 40, 0.99));
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 24px;
    padding: 3rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    position: relative;
}

.qr-payment-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

[dir="rtl"] .qr-payment-close {
    right: auto;
    left: 1rem;
}

.qr-payment-close:hover {
    color: var(--gold-primary, #D4AF37);
}

.qr-payment-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(0, 212, 170, 0.1));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-payment-logo i {
    font-size: 2.5rem;
}

.qr-payment-logo.alipay i {
    color: #1677FF;
}

.qr-payment-logo.wechat i {
    color: #07C160;
}

.qr-code-container {
    background: #fff;
    padding: 1rem;
    border-radius: 16px;
    margin: 1.5rem 0;
    display: inline-block;
}

.qr-code-container img,
.qr-code-container canvas {
    width: 200px;
    height: 200px;
}

.qr-payment-amount {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--gold-primary, #D4AF37);
    margin-bottom: 0.5rem;
}

.qr-payment-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #94a3b8;
    font-size: 0.9rem;
}

.qr-payment-timer i {
    color: var(--teal-accent, #00D4AA);
}

.qr-payment-instruction {
    color: #cbd5e1;
    margin-top: 1.5rem;
    line-height: 1.6;
}

/* ============================================
   BANK TRANSFER DETAILS
   ============================================ */

.bank-transfer-details {
    background: rgba(26, 41, 66, 0.6);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.bank-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.bank-detail-row:last-child {
    border-bottom: none;
}

.bank-detail-label {
    color: #94a3b8;
    font-size: 0.9rem;
}

.bank-detail-value {
    color: #fff;
    font-weight: 600;
    font-family: 'Monaco', 'Menlo', monospace;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.copy-btn {
    background: rgba(212, 175, 55, 0.2);
    border: none;
    color: var(--gold-primary, #D4AF37);
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: rgba(212, 175, 55, 0.4);
}

.copy-btn.copied {
    background: rgba(0, 212, 170, 0.3);
    color: var(--teal-accent, #00D4AA);
}

/* ============================================
   PDC CHEQUE SCHEDULE
   ============================================ */

.pdc-schedule {
    background: rgba(26, 41, 66, 0.6);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
}

.pdc-schedule-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.pdc-schedule-title {
    font-weight: 600;
    color: #fff;
}

.pdc-cheque-count {
    background: linear-gradient(135deg, var(--gold-primary, #D4AF37), #B8941F);
    color: #0A1628;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
}

.pdc-cheque-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(26, 41, 66, 0.4);
    border-radius: 10px;
    margin-bottom: 0.75rem;
}

.pdc-cheque-item:last-child {
    margin-bottom: 0;
}

.pdc-cheque-number {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.3), rgba(0, 212, 170, 0.2));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-primary, #D4AF37);
    font-weight: 700;
    font-size: 0.9rem;
}

.pdc-cheque-date {
    color: #94a3b8;
    font-size: 0.9rem;
}

.pdc-cheque-amount {
    font-weight: 600;
    color: #fff;
    font-family: 'Playfair Display', serif;
}

/* ============================================
   PAYMENT CONFIRMATION
   ============================================ */

.payment-confirmation {
    text-align: center;
    padding: 3rem 2rem;
}

.payment-success-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.2), rgba(0, 168, 138, 0.3));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    animation: successPulse 2s ease-in-out infinite;
}

.payment-success-icon i {
    font-size: 3rem;
    color: var(--teal-accent, #00D4AA);
}

@keyframes successPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(0, 212, 170, 0.4);
    }
    50% {
        box-shadow: 0 0 0 20px rgba(0, 212, 170, 0);
    }
}

.payment-confirmation-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: #fff;
    margin-bottom: 0.5rem;
}

.payment-confirmation-subtitle {
    color: #94a3b8;
    margin-bottom: 2rem;
}

.payment-receipt {
    background: rgba(26, 41, 66, 0.6);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: left;
}

[dir="rtl"] .payment-receipt {
    text-align: right;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.receipt-row:last-child {
    border-bottom: none;
    font-weight: 600;
}

.receipt-label {
    color: #94a3b8;
}

.receipt-value {
    color: #fff;
}

.receipt-row.total .receipt-value {
    color: var(--gold-primary, #D4AF37);
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
}

/* ============================================
   PAYMENT LOGOS STRIP
   ============================================ */

.payment-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    padding: 1.5rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(212, 175, 55, 0.1);
    flex-wrap: wrap;
}

.payment-logo {
    opacity: 0.5;
    transition: opacity 0.3s ease;
    height: 24px;
}

.payment-logo:hover {
    opacity: 1;
}

.payment-logo i {
    font-size: 2rem;
    color: #64748b;
}

/* ============================================
   CHINESE PAYMENT SPECIAL STYLES
   ============================================ */

.chinese-payment-methods {
    background: linear-gradient(135deg, rgba(255, 76, 76, 0.1), rgba(7, 193, 96, 0.1));
    border: 1px solid rgba(255, 76, 76, 0.2);
    border-radius: 16px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.chinese-payment-title {
    font-size: 0.9rem;
    color: #94a3b8;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chinese-payment-title span.zh {
    color: #fff;
    font-weight: 500;
}

.alipay-btn {
    background: linear-gradient(135deg, #1677FF, #0050B3);
    border-color: #1677FF;
}

.alipay-btn:hover {
    background: linear-gradient(135deg, #1890FF, #1677FF);
}

.wechat-btn {
    background: linear-gradient(135deg, #07C160, #05A14B);
    border-color: #07C160;
}

.wechat-btn:hover {
    background: linear-gradient(135deg, #2DC76D, #07C160);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .payment-methods-container {
        padding: 1.5rem;
        border-radius: 16px;
    }

    .payment-methods-grid {
        grid-template-columns: 1fr;
    }

    .payment-method-btn {
        padding: 1rem;
    }

    .payment-method-icon {
        width: 40px;
        height: 40px;
    }

    .payment-method-icon i {
        font-size: 1.2rem;
    }

    .qr-payment-content {
        padding: 2rem 1.5rem;
    }

    .qr-code-container img,
    .qr-code-container canvas {
        width: 180px;
        height: 180px;
    }

    .payment-logos {
        gap: 1rem;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

.payment-method-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.4);
}

.payment-method-btn:focus-visible {
    outline: 2px solid var(--gold-primary, #D4AF37);
    outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .payment-success-icon {
        animation: none;
    }

    .payment-method-btn,
    .qr-payment-modal {
        transition: none;
    }
}
