/* 
 * Genie Business Payment Gateway Integration
 * Premium CSS Design System & Theme
 */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
    --bg-gradient: linear-gradient(135deg, #0f0c1b 0%, #15102a 50%, #06020f 100%);
    --panel-bg: rgba(25, 20, 45, 0.45);
    --panel-border: rgba(255, 255, 255, 0.08);
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.35);
    --secondary-color: #d946ef;
    --secondary-glow: rgba(217, 70, 239, 0.3);
    --text-primary: #f8fafc;
    --text-muted: #94a3b8;
    --text-success: #10b981;
    --text-danger: #ef4444;
    --card-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    --glass-blur: 16px;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background: var(--bg-gradient);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
    padding: 20px;
}

/* Background glowing blobs */
body::before, body::after {
    content: '';
    position: absolute;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    z-index: -1;
    filter: blur(120px);
    opacity: 0.4;
    pointer-events: none;
}

body::before {
    background: var(--primary-color);
    top: 15%;
    left: 10%;
    animation: floatBlob1 15s infinite alternate ease-in-out;
}

body::after {
    background: var(--secondary-color);
    bottom: 15%;
    right: 10%;
    animation: floatBlob2 18s infinite alternate ease-in-out;
}

@keyframes floatBlob1 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(40px, 30px) scale(1.15); }
}

@keyframes floatBlob2 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-50px, -40px) scale(1.1); }
}

/* Main Container & Card */
.payment-container {
    width: 100%;
    max-width: 500px;
    perspective: 1000px;
    z-index: 10;
}

.payment-card {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--card-shadow);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s;
}

.payment-card:hover {
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4), 0 0 30px rgba(99, 102, 241, 0.15);
}

/* Header styling */
.payment-header {
    text-align: center;
    margin-bottom: 32px;
}

.logo-container {
    margin-bottom: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.logo-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
    position: relative;
    overflow: hidden;
}

.logo-icon::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(45deg);
    animation: shine 4s infinite linear;
}

@keyframes shine {
    0% { transform: translate(-100%, -100%) rotate(45deg); }
    100% { transform: translate(100%, 100%) rotate(45deg); }
}

.payment-header h1 {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, #ffffff, #e2e8f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.payment-header p {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 400;
}

/* Form inputs & styling */
.form-group {
    margin-bottom: 24px;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #cbd5e1;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    color: var(--text-muted);
    font-size: 18px;
    transition: color 0.3s;
    pointer-events: none;
}

.form-input {
    width: 100%;
    padding: 14px 16px 14px 46px;
    background: rgba(10, 8, 20, 0.5);
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 15px;
    font-family: var(--font-body);
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.form-input:focus {
    border-color: var(--primary-color);
    background: rgba(10, 8, 20, 0.8);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.form-input:focus ~ .input-icon {
    color: var(--primary-color);
}

/* Currency input specifics */
.amount-wrapper {
    display: flex;
    align-items: center;
    position: relative;
}

.currency-badge {
    position: absolute;
    left: 16px;
    font-weight: 700;
    font-size: 14px;
    color: var(--primary-color);
    letter-spacing: 0.5px;
    pointer-events: none;
}

.amount-input {
    padding-left: 56px;
    font-weight: 700;
    font-size: 18px;
    color: #fff;
    letter-spacing: 0.5px;
}

/* Hide number input spinners (arrows) */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type=number] {
    -moz-appearance: textfield;
}

/* Dropdown styling */
select.form-input {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.dropdown-arrow {
    position: absolute;
    right: 16px;
    color: var(--text-muted);
    pointer-events: none;
    font-size: 12px;
}

/* Buttons and actions */
.btn-submit {
    display: block;
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.25);
    position: relative;
    overflow: hidden;
    text-align: center;
    text-decoration: none;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(99, 102, 241, 0.4), 0 0 15px rgba(217, 70, 239, 0.2);
    background: linear-gradient(135deg, #7073f5 0%, var(--primary-color) 100%);
}

.btn-submit:active {
    transform: translateY(1px);
}

/* Spinner overlay for redirection */
.spinner-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 12, 27, 0.95);
    z-index: 100;
    border-radius: 24px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(8px);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(99, 102, 241, 0.15);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s infinite linear;
    margin-bottom: 20px;
}

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

.spinner-text {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.5px;
}

.spinner-subtext {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 6px;
}

/* Results / Receipt styling */
.receipt-header {
    text-align: center;
    margin-bottom: 28px;
}

.success-icon-wrapper {
    width: 72px;
    height: 72px;
    background: rgba(16, 185, 129, 0.12);
    border: 2px solid var(--text-success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    color: var(--text-success);
    font-size: 36px;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
    animation: bounceIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

.cancel-icon-wrapper {
    width: 72px;
    height: 72px;
    background: rgba(239, 68, 68, 0.12);
    border: 2px solid var(--text-danger);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    color: var(--text-danger);
    font-size: 36px;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.2);
    animation: bounceIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); opacity: 0.8; }
    70% { transform: scale(0.9); opacity: 0.9; }
    100% { transform: scale(1); opacity: 1; }
}

.receipt-header h2 {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
}

.receipt-details {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 28px;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 14px;
}

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

.receipt-label {
    color: var(--text-muted);
    font-weight: 500;
}

.receipt-value {
    color: #fff;
    font-weight: 600;
    text-align: right;
    max-width: 60%;
    word-break: break-all;
}

.receipt-total {
    font-size: 18px;
    border-top: 2px dashed rgba(255, 255, 255, 0.12);
    padding-top: 16px;
    margin-top: 4px;
}

.receipt-total .receipt-value {
    color: var(--primary-color);
    font-size: 22px;
    font-family: var(--font-heading);
    font-weight: 800;
}

.receipt-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.btn-secondary {
    display: block;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.print-btn {
    grid-column: span 2;
    margin-top: 10px;
}

/* Footer info */
.powered-by {
    text-align: center;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.25);
    margin-top: 24px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-weight: 600;
}

.powered-by span {
    color: rgba(255, 255, 255, 0.4);
}

/* Print optimizations */
@media print {
    body {
        background: #fff;
        color: #000;
    }
    .payment-card {
        border: none;
        box-shadow: none;
        background: transparent;
        padding: 0;
    }
    .btn-submit, .btn-secondary, .print-btn, .powered-by, body::before, body::after {
        display: none !important;
    }
    .receipt-details {
        border: 1px solid #ddd;
        background: transparent;
    }
    .receipt-value {
        color: #000;
    }
    .receipt-total .receipt-value {
        color: #000;
    }
}
