/* Custom styling for phosrmc (Hospital Medical Equipment Management System) */
/* Designed with UI/UX Pro Max standards for high readability, minimal visual noise, and clean medical hierarchy */

@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@400;500;600;700&family=Sarabun:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
    --primary: #0d9488;
    --primary-dark: #0f766e;
    --primary-light: #f0fdfa;
    --surface: #ffffff;
    --background: #f8fafc;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-subtle: #e2e8f0;
    --border-card: #f1f5f9;
}

body {
    font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Headings use Prompt for modern, confident medical authority */
h1, h2, h3, h4, .font-heading {
    font-family: 'Prompt', 'Sarabun', sans-serif;
}

/* Clean accessible focus indicators */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid #0d9488;
    outline-offset: 2px;
}

/* Refined custom scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #f8fafc;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Interactive Metric Strip (Single cohesive bar instead of scattered boxes) */
.metric-strip-item {
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    user-select: none;
    border-radius: 0.75rem;
}
.metric-strip-item:hover {
    background-color: #f1f5f9;
}
.metric-strip-item.active {
    background-color: #f0fdfa;
    box-shadow: inset 0 0 0 1.5px #14b8a6;
}

/* Animated Scan Laser Line for Camera Viewfinder */
@keyframes scanLaser {
    0% {
        top: 5%;
        opacity: 0.8;
    }
    50% {
        top: 90%;
        opacity: 1;
    }
    100% {
        top: 5%;
        opacity: 0.8;
    }
}

.scan-laser-line {
    position: absolute;
    left: 8%;
    right: 8%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #14b8a6, #2dd4bf, #14b8a6, transparent);
    box-shadow: 0 0 12px 2px rgba(20, 184, 166, 0.85);
    animation: scanLaser 2.2s ease-in-out infinite;
    pointer-events: none;
    z-index: 10;
}

#qr-reader-container video {
    object-fit: cover !important;
    border-radius: 1rem !important;
    width: 100% !important;
}

/* Thermal Sticker Print Styles */
@media print {
    body * {
        visibility: hidden;
    }
    #print-container, #print-container * {
        visibility: visible;
    }
    #print-container {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        margin: 0;
        padding: 0;
    }
}

/* Reduced motion accessibility */
@media (prefers-reduced-motion: reduce) {
    *, ::before, ::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .scan-laser-line {
        animation: none;
        top: 50%;
    }
}
