/**
 * Payment Component Styles
 * ===================================
 */

/* Payment Loader Overlay */
.payment-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.payment-loader-content {
    background: white;
    padding: 2rem 3rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.payment-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e5e7eb;
    border-top-color: #2563EB;
    border-radius: 50%;
    animation: paymentSpin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes paymentSpin {
    to {
        transform: rotate(360deg);
    }
}

.payment-loader-content p {
    color: #1E293B;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

/* Payment Notification */
.payment-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    background: white;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 10001;
    animation: slideInRight 0.3s ease;
    max-width: 400px;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.payment-notification.fade-out {
    animation: slideOutRight 0.3s ease forwards;
}

@keyframes slideOutRight {
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.payment-notification i:first-child {
    font-size: 1.25rem;
}

.payment-notification span {
    flex: 1;
    font-weight: 500;
    color: #1E293B;
}

.payment-notification .notification-close {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.2s;
}

.payment-notification .notification-close:hover {
    color: #64748b;
}

/* Notification Types */
.payment-notification.success {
    border-left: 4px solid #10B981;
}

.payment-notification.success i:first-child {
    color: #10B981;
}

.payment-notification.error {
    border-left: 4px solid #EF4444;
}

.payment-notification.error i:first-child {
    color: #EF4444;
}

.payment-notification.info {
    border-left: 4px solid #3B82F6;
}

.payment-notification.info i:first-child {
    color: #3B82F6;
}

.payment-notification.warning {
    border-left: 4px solid #F59E0B;
}

.payment-notification.warning i:first-child {
    color: #F59E0B;
}

/* Payment Button Styles */
.payment-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #2563EB, #1D4ED8);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.payment-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.payment-btn:active {
    transform: translateY(0);
}

.payment-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Purchase Modal Updates */
.purchase-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.purchase-modal {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 420px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: scaleIn 0.3s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.purchase-modal .modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    text-align: center;
}

.purchase-modal .modal-header i {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

.purchase-modal .modal-header h3 {
    font-size: 1.3rem;
    margin: 0;
}

.purchase-modal .modal-body {
    padding: 1.5rem;
}

.purchase-modal .modal-body p {
    color: #64748B;
    margin-bottom: 0.5rem;
}

.purchase-modal .modal-body h4 {
    color: #1E293B;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.purchase-modal .modal-price {
    font-size: 2rem;
    font-weight: 700;
    color: #2563EB;
    margin-bottom: 1rem;
}

.purchase-modal .modal-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
}

.purchase-modal .modal-features li {
    padding: 0.5rem 0;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.purchase-modal .modal-features li i {
    color: #10B981;
}

.purchase-modal .modal-actions {
    display: flex;
    gap: 1rem;
    padding: 0 1.5rem 1.5rem;
}

.purchase-modal .modal-actions .btn {
    flex: 1;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border-radius: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

.purchase-modal .btn-secondary {
    background: #f1f5f9;
    color: #64748b;
    border: none;
}

.purchase-modal .btn-secondary:hover {
    background: #e2e8f0;
}

.purchase-modal .btn-primary {
    background: linear-gradient(135deg, #2563EB, #1D4ED8);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.purchase-modal .btn-primary:hover {
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

/* Security Badge */
.payment-security {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    font-size: 0.85rem;
    color: #64748b;
}

.payment-security i {
    color: #10B981;
}

/* Powered by Razorpay */
.razorpay-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: #94a3b8;
}

.razorpay-badge img {
    height: 18px;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    .payment-notification {
        right: 10px;
        left: 10px;
        max-width: none;
        padding: 0.875rem 1rem;
        font-size: 0.9rem;
    }

    .payment-notification span {
        font-size: 0.9rem;
    }

    .purchase-modal .modal-actions {
        flex-direction: column;
    }

    .payment-loader-content {
        padding: 1.5rem 2rem;
        margin: 0 1rem;
    }

    .purchase-modal {
        width: 95%;
        margin: 1rem;
    }

    .purchase-modal .modal-header {
        padding: 1.25rem;
    }

    .purchase-modal .modal-header h3 {
        font-size: 1.1rem;
    }

    .purchase-modal .modal-body {
        padding: 1.25rem;
    }

    .purchase-modal .modal-price {
        font-size: 1.75rem;
    }

    .purchase-modal .modal-actions {
        padding: 0 1.25rem 1.25rem;
    }

    .payment-btn {
        padding: 0.65rem 1.25rem;
        font-size: 0.95rem;
    }
}

/* Tablet responsiveness */
@media (max-width: 768px) {
    .payment-notification {
        max-width: calc(100% - 40px);
    }

    .purchase-modal {
        max-width: 90%;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .payment-btn {
        min-height: 48px;
        padding: 0.875rem 1.5rem;
    }

    .purchase-modal .modal-actions .btn {
        min-height: 48px;
    }

    .payment-notification .notification-close {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Safe area for notched devices */
@supports (padding: max(0px)) {
    .payment-notification {
        top: max(20px, env(safe-area-inset-top));
        right: max(20px, env(safe-area-inset-right));
    }

    @media (max-width: 480px) {
        .payment-notification {
            right: max(10px, env(safe-area-inset-right));
            left: max(10px, env(safe-area-inset-left));
        }
    }
}

/* Prevent body scroll when modal is open */
body.payment-modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .payment-notification {
        border: 2px solid currentColor;
    }

    .payment-btn {
        border: 2px solid white;
    }
}
