/* web/css/glass.css */

.glass-panel {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1.5px solid rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-bento);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.05);
    padding: 2rem;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease, border-color 0.4s ease;
}

:root[data-theme='dark'] .glass-panel {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.glass-panel:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: rgba(255, 255, 255, 0.8);
}

:root[data-theme='dark'] .glass-panel:hover {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

/* The Scanner Camera Frame */
.scanner-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto 2rem;
    overflow: hidden;
    border-radius: var(--radius-bento);
    background: #000;
}

#camera-preview {
    width: 100%;
    display: none;
    aspect-ratio: 1;
    object-fit: cover;
}

.scanner-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    box-shadow: inset 0 0 0 2000px rgba(0,0,0,0.5);
    pointer-events: none;
    display: none; /* Hidden until camera starts */
}

/* 
  Hack for creating a clear "window" in the overlay 
  using a huge border with transparent background
*/
#camera-preview[style*="display: block"] + .scanner-overlay {
    display: block;
    border: 50px solid rgba(0,0,0,0.5);
    box-shadow: none;
    border-radius: var(--radius-bento);
}

/* Gate styles moved to main.css for Bento UI consistency */
@keyframes slideUp {
    from { transform: translateY(40px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}


@keyframes slideUp {
    from { transform: translateY(40px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Loading Overlay for lookup */
#loading-overlay {
    position: fixed;
    top:0; left:0; right:0; bottom:0;
    background: rgba(255,255,255,0.8);
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.spinner {
    width: 48px;  height: 48px;
    border: 4px solid var(--color-pantry);
    border-bottom-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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