/**
 * NEW MOBILE BAZAR - Biometric Module Banking-Grade CSS Design System
 * Aesthetic: Professional Banking Software, Glassmorphism, Dark Theme
 * Palette: Slate (#030712), Cyan (#06b6d4), Blue (#0284c7), Purple (#8b5cf6), Rose (#f43f5e)
 */

:root {
    --bio-bg-dark: #030712;
    --bio-card-bg: rgba(15, 23, 42, 0.88);
    --bio-card-border: rgba(255, 255, 255, 0.12);
    --bio-cyan: #06b6d4;
    --bio-blue: #0284c7;
    --bio-purple: #8b5cf6;
    --bio-emerald: #10b981;
    --bio-rose: #f43f5e;
    --bio-amber: #f59e0b;
    --bio-text-main: #f8fafc;
    --bio-text-muted: #94a3b8;
}

/* Glassmorphism Container */
.bio-glass-card {
    background: var(--bio-card-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--bio-card-border);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6), 0 0 30px rgba(6, 182, 212, 0.15);
}

/* Glassmorphism Modal Backdrop */
.bio-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 99990;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(3, 7, 18, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 1.25rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    overflow-y: auto;
}

.bio-modal-backdrop.bio-active {
    opacity: 1;
    visibility: visible;
}

.bio-modal-content {
    width: 100%;
    max-width: 30rem;
    margin: auto;
    transform: scale(0.95) translateY(10px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.bio-modal-backdrop.bio-active .bio-modal-content {
    transform: scale(1) translateY(0);
}

/* Finger Scanner Pulsing Rings & Perfect Centering */
.bio-scanner-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-sizing: border-box;
}

.bio-scanner-ring-bg {
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.25) 0%, rgba(139, 92, 246, 0.15) 60%, rgba(0, 0, 0, 0) 100%);
    animation: bioPulseGlow 3s infinite ease-in-out;
    pointer-events: none;
}

.bio-scanner-ring-active {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px dashed var(--bio-cyan);
    animation: bioSpinRing 12s linear infinite;
    pointer-events: none;
}

.bio-scanner-ring-active.scanning {
    border-color: var(--bio-rose);
    border-style: solid;
    animation: bioSpinRing 2s linear infinite, bioPing 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.bio-scanner-icon-box {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border: 2px solid rgba(6, 182, 212, 0.4);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    z-index: 10;
    margin: auto;
}

.bio-scanner-icon {
    font-size: 2.75rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    text-align: center;
    background: linear-gradient(135deg, #38bdf8 0%, #06b6d4 50%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.bio-scanner-wrapper.scanning .bio-scanner-icon {
    background: linear-gradient(135deg, #fb7185 0%, #f43f5e 50%, #e11d48 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(244, 63, 94, 0.8));
    animation: bioScannerPulse 1.2s ease-in-out infinite;
}

.bio-laser-sweep {
    position: absolute;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, var(--bio-cyan) 50%, transparent 100%);
    box-shadow: 0 0 12px var(--bio-cyan);
    top: 0;
    opacity: 0;
}

.bio-scanner-wrapper.scanning .bio-laser-sweep {
    opacity: 1;
    background: linear-gradient(90deg, transparent 0%, var(--bio-rose) 50%, transparent 100%);
    box-shadow: 0 0 12px var(--bio-rose);
    animation: bioLaserSweep 1.8s ease-in-out infinite alternate;
}

/* Keyframe Animations */
@keyframes bioPulseGlow {
    0%, 100% { transform: scale(1); opacity: 0.45; }
    50% { transform: scale(1.08); opacity: 0.8; }
}

@keyframes bioSpinRing {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes bioPing {
    75%, 100% { transform: scale(1.2); opacity: 0; }
}

@keyframes bioScannerPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

@keyframes bioLaserSweep {
    0% { top: 5%; }
    100% { top: 90%; }
}

/* Toast Notification Styles */
.bio-toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
    max-width: 420px;
    width: calc(100vw - 3rem);
}

.bio-toast {
    pointer-events: auto;
    display: flex;
    items-center;
    gap: 0.875rem;
    padding: 1rem 1.25rem;
    border-radius: 1.25rem;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    color: var(--bio-text-main);
    transform: translateY(-20px);
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.bio-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.bio-toast-success { border-color: rgba(16, 185, 129, 0.4); }
.bio-toast-error { border-color: rgba(244, 63, 94, 0.4); }
.bio-toast-warning { border-color: rgba(245, 158, 11, 0.4); }
.bio-toast-info { border-color: rgba(6, 182, 212, 0.4); }

/* Debug Console Terminal */
.bio-debug-console {
    background-color: #020617;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 0.7rem;
    line-height: 1.4;
    color: #38bdf8;
    max-height: 180px;
    overflow-y: auto;
    padding: 0.75rem;
    white-space: pre-wrap;
    word-break: break-word;
}

.bio-debug-console::-webkit-scrollbar {
    width: 5px;
}

.bio-debug-console::-webkit-scrollbar-track {
    background: #090d16;
}

.bio-debug-console::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 3px;
}

/* Accessibility Focus Outline */
.bio-glass-card button:focus-visible,
.bio-glass-card a:focus-visible {
    outline: 2px solid var(--bio-cyan);
    outline-offset: 2px;
}
