/* paypal-popup.css - Purchase Flow Popup Styles */

/* ============================================
   PURCHASE MODAL OVERLAY
   ============================================ */

.purchase-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.purchase-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   MODAL CONTENT
   ============================================ */

.purchase-modal-content {
    background: linear-gradient(to bottom, #1a1a2e, #0f0f1e);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 480px;
    width: 95%;
    position: relative;
    box-shadow:
        0 25px 80px rgba(0, 0, 0, 0.6);
    animation: purchaseModalSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

@keyframes purchaseModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-40px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ============================================
   CLOSE BUTTON
   ============================================ */

.purchase-close-btn {
    position: absolute;
    right: 20px;
    top: 20px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.purchase-close-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
    transform: rotate(90deg);
}

/* ============================================
   MODAL HEADER
   ============================================ */

.purchase-header {
    padding: 32px 32px 24px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.purchase-header .icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(99, 102, 241, 0.2));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.purchase-header .icon i {
    font-size: 28px;
    background: linear-gradient(135deg, #60a5fa, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.purchase-header h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: #f1f5f9;
    margin: 0 0 8px;
}

.purchase-header p {
    color: #94a3b8;
    font-size: 0.95rem;
    margin: 0;
}

/* ============================================
   PRICE SECTION
   ============================================ */

.purchase-price {
    padding: 24px 32px;
    background: rgba(255, 255, 255, 0.03);
    text-align: center;
}

.purchase-price .amount {
    font-size: 3rem;
    font-weight: 900;
    color: #f1f5f9;
    line-height: 1;
}

.purchase-price .currency {
    font-size: 1.5rem;
    vertical-align: super;
}

.purchase-price .label {
    color: #64748b;
    font-size: 0.9rem;
    margin-top: 8px;
}

.purchase-price .badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 600;
}

/* ============================================
   FEATURES LIST
   ============================================ */

.purchase-features {
    padding: 24px 32px;
}

.purchase-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 12px;
}

.purchase-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #cbd5e1;
    font-size: 0.95rem;
}

.purchase-features li i {
    color: #3b82f6;
    font-size: 14px;
    width: 20px;
    text-align: center;
}

/* ============================================
   ACTION BUTTONS
   ============================================ */

.purchase-actions {
    padding: 24px 32px 32px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Payment Button - PayPal Style */
.payment-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 16px 24px;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.payment-btn:hover {
    background: #293548;
    border-color: rgba(255, 255, 255, 0.2);
}

.payment-btn:active {
    background: #1e293b;
}

.payment-btn i {
    font-size: 1.3rem;
}

.payment-btn.hidden {
    display: none;
}

/* Download Button */
.download-purchase-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 16px 24px;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.download-purchase-btn:hover:not(.disabled) {
    background: #293548;
    border-color: rgba(255, 255, 255, 0.2);
}

.download-purchase-btn i {
    font-size: 1.2rem;
}

/* Disabled Download Button */
.download-purchase-btn.disabled {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #64748b;
    cursor: not-allowed;
    box-shadow: none;
}

.download-purchase-btn.disabled:hover {
    transform: none;
}

/* Success State */
.purchase-success-message {
    display: none;
    text-align: center;
    padding: 16px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 12px;
    color: #10b981;
    font-weight: 600;
    margin-bottom: 12px;
}

.purchase-success-message.show {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    animation: successPulse 0.5s ease;
}

@keyframes successPulse {
    0% {
        transform: scale(0.95);
        opacity: 0;
    }

    50% {
        transform: scale(1.02);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ============================================
   FOOTER
   ============================================ */

.purchase-footer {
    padding: 16px 32px;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.purchase-footer span {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
    font-size: 0.8rem;
}

.purchase-footer i {
    color: #3b82f6;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 640px) {
    .purchase-modal-content {
        width: 100%;
        max-width: none;
        max-height: 100%;
        border-radius: 0;
        overflow-y: auto;
    }

    .purchase-header,
    .purchase-price,
    .purchase-features,
    .purchase-actions,
    .purchase-footer {
        padding-left: 24px;
        padding-right: 24px;
    }

    .purchase-header h2 {
        font-size: 1.5rem;
    }

    .purchase-price .amount {
        font-size: 2.5rem;
    }

    .purchase-footer {
        flex-direction: column;
        gap: 8px;
    }
}

/* ============================================
   PROCESSING STATE
   ============================================ */

.payment-btn.processing {
    pointer-events: none;
    opacity: 0.8;
}

.payment-btn.processing .btn-text {
    display: none;
}

.payment-btn .processing-text {
    display: none;
}

.payment-btn.processing .processing-text {
    display: flex;
    align-items: center;
    gap: 10px;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}