/* Payment Concept Styles */

/* Glass Panel */
.glass-panel {
    background: rgba(26, 34, 45, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.glass-button {
    background: rgba(37, 140, 244, 0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(37, 140, 244, 0.3);
}

/* Screen overrides for payment/complete layout */
#payment-screen,
#complete-screen {
    display: block;
    padding: 0;
    background: #101922;
    text-align: initial;
}

#payment-screen .glass-panel,
#complete-screen .glass-panel {
    background: rgba(26, 34, 45, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

#payment-screen .rounded-lg,
#complete-screen .rounded-lg {
    border-radius: 1.5rem;
}

#payment-screen .rounded-xl,
#complete-screen .rounded-xl {
    border-radius: 2rem;
}

#payment-screen .rounded-2xl,
#complete-screen .rounded-2xl {
    border-radius: 3rem;
}

.no-scrollbar {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}

/* Animations */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse-glow {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

@keyframes scale-in {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes card-read {

    0%,
    100% {
        transform: translateX(0) rotate(0deg);
    }

    25% {
        transform: translateX(-10px) rotate(-5deg);
    }

    75% {
        transform: translateX(10px) rotate(5deg);
    }
}

@keyframes card-swipe {

    0%,
    22% {
        transform: translateX(0) translateY(-6px) rotate(82deg);
    }

    40% {
        transform: translateX(-10px) translateY(-58px) rotate(-4deg);
    }

    50% {
        transform: translateX(-14px) translateY(-70px) rotate(-6deg);
    }

    68%,
    100% {
        transform: translateX(0) translateY(-6px) rotate(82deg);
    }
}

@keyframes progress-shrink {
    0% {
        width: 100%;
    }

    100% {
        width: 0%;
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        display: flex;
    }

    1% {
        opacity: 0;
        display: flex;
    }

    100% {
        opacity: 1;
        display: flex;
    }
}

@keyframes fadeOut {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        display: none;
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

@keyframes reader-lamp {

    0%,
    30%,
    100% {
        background: rgba(148, 163, 184, 0.35);
        box-shadow: 0 0 0 rgba(34, 197, 94, 0);
    }

    40%,
    55% {
        background: #22c55e;
        box-shadow: 0 0 10px rgba(34, 197, 94, 0.9), 0 0 22px rgba(34, 197, 94, 0.6);
    }

    65% {
        background: rgba(148, 163, 184, 0.35);
        box-shadow: 0 0 0 rgba(34, 197, 94, 0);
    }
}

@keyframes reader-pulse {

    0%,
    34% {
        opacity: 0;
        transform: scale(0.8);
    }

    40% {
        opacity: 0.6;
        transform: scale(0.9);
    }

    55%,
    100% {
        opacity: 0;
        transform: scale(1.35);
    }
}

/* Utility Classes for Concept */
.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-pulse-glow {
    animation: pulse-glow 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-card-read {
    animation: card-read 3s ease-in-out infinite;
}

.card-swipe {
    animation: card-swipe 4.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    transform-origin: bottom right;
}

.card-reader-stage {
    width: 320px;
    height: 260px;
}

#payment-screen .card-reader {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 240px;
    height: 240px;
    overflow: visible;
    isolation: isolate;
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(51, 65, 85, 0.7), rgba(15, 23, 42, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), inset 0 -8px 18px rgba(0, 0, 0, 0.4), 0 22px 38px -24px rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

#payment-screen .card-reader::before {
    content: "";
    position: absolute;
    inset: 10px;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(15, 23, 42, 0.65));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    z-index: 0;
}

#payment-screen .card-reader::after {
    content: "";
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: -12px;
    height: 18px;
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.2));
    box-shadow: 0 12px 18px -12px rgba(0, 0, 0, 0.8);
    z-index: 0;
}

.card-reader-shell {
    position: absolute;
    inset: 18px;
    border-radius: 10px;
    background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.28), rgba(148, 163, 184, 0.12) 55%, rgba(15, 23, 42, 0.9) 100%);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: inset 0 10px 20px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
    pointer-events: none;
    z-index: 1;
}

.card-reader-lamp {
    position: absolute;
    top: 1.05rem;
    right: 1.05rem;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 9999px;
    background: rgba(148, 163, 184, 0.35);
    box-shadow: 0 0 0 rgba(34, 197, 94, 0);
    animation: reader-lamp 4.8s ease-in-out infinite;
    z-index: 40;
}

.card-reader-pulse {
    position: absolute;
    inset: -22px;
    border: 2px solid rgba(34, 197, 94, 0.45);
    border-radius: 16px;
    opacity: 0;
    transform: scale(0.8);
    animation: reader-pulse 4.8s ease-in-out infinite;
    pointer-events: none;
    box-shadow: 0 0 18px rgba(34, 197, 94, 0.35);
    z-index: 35;
}

.animate-progress-shrink {
    animation: progress-shrink linear forwards;
}

.animate-shimmer {
    animation: shimmer 2s infinite;
}

/* State Containers */
.state-pending,
.state-success,
.state-redirect {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 2rem;
}

.state-pending {
    /* User design handles display flex via Tailwind usually */
    display: flex;
}

/* Success state hidden by default */
.state-success {
    display: none;
    opacity: 0;
}

.state-success.active {
    display: flex;
    opacity: 1;
    /* transition handled by JS or simple fade */
    animation: fadeIn 0.5s ease-in-out forwards;
}

/* Redirect footer hidden by default */
.state-redirect {
    display: none;
    opacity: 0;
}

.state-redirect.active {
    display: flex;
    opacity: 1;
    animation: fadeIn 0.5s ease-in-out forwards;
}

/* Custom Text Sizes */
.text-7rem {
    font-size: 7rem;
    line-height: 0.9;
}

/* Background Colors from Concept */
.bg-background-dark {
    background-color: #101922;
}

.text-primary {
    color: #258cf4;
}

.bg-primary {
    background-color: #258cf4;
}

.bg-surface-dark {
    background-color: #1a222d;
}