/* Custom components for Yellow Scanner */

/* Import Inter font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Apply Inter font globally */
* {
    font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Yellow primary color definition */
.bg-yellow-primary {
    background-color: #ffee34;
}

.text-yellow-primary {
    color: #ffee34;
}

/* Animation utilities */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation-name: spin;
    animation-duration: 1s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    animation-fill-mode: both;
    display: inline-block;
}

/* Spinner specific styles */
#loadingOverlay .animate-spin {
    border: 8px solid #1f2937;
    border-top-color: transparent;
    border-radius: 50%;
    width: 6rem;
    height: 6rem;
    display: inline-block;
}

/* Border utilities for spinner */
.border-8 {
    border-width: 8px;
}

.border-1 {
    border-width: 1px;
}

.border-t-transparent {
    border-top-color: transparent !important;
}

.border-gray-800 {
    border-color: #1f2937;
}

/* Button base style */
.btn {
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    font-weight: 500;
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* Primary button style */
.btn-primary {
    background-color: #ffee34; /* yellow-primary */
    color: #1f2937; /* gray-800 */
}
.btn-primary:hover {
    opacity: 0.8;
}

/* Secondary button style */
.btn-secondary {
    background-color: #e5e7eb; /* gray-200 */
    color: #1f2937; /* gray-800 */
}
.btn-secondary:hover {
    background-color: #d1d5db; /* gray-300 */
}

/* Navigation link style */
.nav-link {
    color: #1f2937; /* gray-800 */
    transition-property: color;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}
.nav-link:hover {
    color: #ffee34; /* yellow-primary */
}

/* Mobile menu item style */
.mobile-menu-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.5rem 1rem;
    color: #1f2937; /* gray-800 */
    transition-property: color, background-color;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}
.mobile-menu-item:hover {
    background-color: #ffee34; /* yellow-primary */
}

/* Dropdown menu style */
.dropdown-menu {
    position: absolute;
    right: 0;
    margin-top: 0.5rem;
    width: 12rem;
    background-color: white;
    border-radius: 0.375rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
    z-index: 10;
    border: 1px solid #e5e7eb; /* gray-200 */
}

/* Text color utilities */
.text-yellow-600 {
    color: #ca8a04;
}

.text-blue-600 {
    color: #2563eb;
}

.text-red-600 {
    color: #dc2626;
}

/* Brand accent box shadow */
.shadow-accent {
    box-shadow: 2px 2px #d81159;
}

/* Soft shadow and cream background for buttons */
.shadow-soft {
    box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.2);
}

.bg-cream {
    background-color: #fffbeb;
}

.border-2-solid {
    border: 2px solid;
}

/* Hover utility for cream buttons */
.hover-bg-cream:hover {
    background-color: #fef3c7;
}

/* Background color utilities */
.bg-gray-200 {
    background-color: #e5e7eb;
}

.bg-red-500 {
    background-color: #ef4444;
}

.bg-green-500 {
    background-color: #22c55e;
}

/* Emphasis rose button colors (fallback if Tailwind rose isn't available) */
.bg-rose-600 {
    background-color: #e11d48; /* Tailwind rose-600 */
}
.hover\:bg-rose-700:hover {
    background-color: #be123c; /* Tailwind rose-700 */
}
/* Added for bulk close button */
.bg-rose-700 {
    background-color: #be123c; /* Tailwind rose-700 */
}
.hover\:bg-rose-800:hover {
    background-color: #9f1239; /* Tailwind rose-800 */
}

/* Height utilities */
.h-2 {
    height: 0.5rem;
}

.h-full {
    height: 100%;
}

.h-24 {
    height: 6rem;
}

/* Width utilities */
.w-24 {
    width: 6rem;
}

/* Margin utilities */
.mb-4 {
    margin-bottom: 1rem;
}

/* Rounded utilities */
.rounded-full {
    border-radius: 9999px;
}

/* Overflow utilities */
.overflow-hidden {
    overflow: hidden;
}

/* Pill utility: standardize badge/pill height */
.pill {
    display: inline-flex;
    align-items: center;
    height: 32px; /* h-8 */
}

/* Fullscreen message overlay */
.fullscreen-message {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 50;
    padding: 2rem;
    text-align: center;
}

/* Display utilities */
.hidden {
    display: none;
}

/* Text utilities */
.text-white {
    color: white;
}

.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.font-bold {
    font-weight: 700;
}

/* Mobile PWA Theme Color Fixes */
@media (max-width: 768px) {
    /* Ensure full viewport coverage for mobile PWA */
    html, body {
        margin: 0;
        padding: 0;
        border: none;
        outline: none;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Fix for mobile browser chrome/status bar */
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
        background-color: #ffee34;
    }
    
    /* Ensure container backgrounds match theme */
    .container {
        background-color: transparent;
    }
    
    /* Fix for potential border issues on mobile */
    * {
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
    }
    
    /* Specific fix for mobile viewport meta theme color */
    @supports (padding: max(0px)) {
        body {
            padding-top: max(env(safe-area-inset-top), 0px);
            padding-bottom: max(env(safe-area-inset-bottom), 0px);
        }
    }
}

/* PWA Standalone Mode Specific Styles */
@media all and (display-mode: standalone) {
    body {
        background-color: #ffee34;
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
    
    /* Remove any potential borders in standalone mode */
    html {
        border: none;
        outline: none;
    }
}

/* Voucher Modal: make individual note items show a red border */
#voucherModal #modalNotesList > div.border {
    border: 3px solid red !important;
}

/* Voucher Modal: force mutations list font size */
#voucherModal #modalMutations {
    font-size: 12px !important;
}

/* Dashboard specific styles moved from inline */
@media (min-width: 768px) {
    .sidebar-menu {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
        position: fixed;
        width: 16rem;
        z-index: 10;
    }
    .main-content {
        margin-left: 16rem;
    }
}

/* Ensure QR code inside modalVoucherQrCode fills container height with width auto */

/* Brand Colors - Teal */
.bg-teal-brand {
    background-color: #0097b2 !important;
}
.hover-bg-teal-brand-dark:hover {
    background-color: #007a8f !important;
}
.border-l-teal-brand-dark {
    border-left-color: #007a8f !important;
}
.focus-ring-teal-brand:focus {
    --tw-ring-color: #0097b2 !important;
}
