/* ========================================
   CMB Appliance Guard - Custom Styles
   ======================================== */

/* Base */
* {
    -webkit-tap-highlight-color: transparent;
}

body {
    overscroll-behavior: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Scrollbar hiding */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-in {
    animation: fadeIn 0.3s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
.bottom-sheet-enter {
    animation: slideUp 0.3s ease-out;
}

@keyframes fadeInOverlay {
    from { opacity: 0; }
    to { opacity: 1; }
}
.bottom-sheet-overlay {
    animation: fadeInOverlay 0.3s ease-out;
}

/* Appliance cards */
.appliance-card {
    transition: all 0.2s ease;
}
.appliance-card:active {
    transform: scale(0.97);
}

/* Claim timer ring */
.claim-timer-ring {
    animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes pulse-ring {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Focus styles */
input:focus, button:focus, select:focus, textarea:focus {
    outline: 2px solid #1E3A5F;
    outline-offset: 2px;
}

/* Custom scrollbar for webkit */
::-webkit-scrollbar {
    width: 4px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

/* Admin sidebar */
.admin-sidebar {
    min-height: 100vh;
}

/* Status badges */
.status-badge {
    @apply inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium;
}
.status-badge-active {
    @apply bg-green-100 text-green-800;
}
.status-badge-draft {
    @apply bg-blue-100 text-blue-800;
}
.status-badge-submitted {
    @apply bg-yellow-100 text-yellow-800;
}
.status-badge-approved {
    @apply bg-green-100 text-green-800;
}
.status-badge-rejected {
    @apply bg-red-100 text-red-800;
}

/* Loading spinner */
.spinner {
    border: 3px solid #e2e8f0;
    border-top-color: #1E3A5F;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 0.6s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Toast notifications */
.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    padding: 12px 24px;
    border-radius: 12px;
    background: #1E3A5F;
    color: white;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: slideUp 0.3s ease-out;
}

/* ─── Online/Offline Indicator ─────────────── */
#pwa-status-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    letter-spacing: 0.3px;
    transition: transform 0.3s ease;
    transform: translateY(-100%);
    text-transform: uppercase;
}
#pwa-status-bar.show {
    transform: translateY(0);
}
#pwa-status-bar.online {
    background: #16a34a;
    color: #fff;
}
#pwa-status-bar.offline {
    background: #dc2626;
    color: #fff;
}

/* ========================================
   Responsive Container Expansion
   Makes the content area wider on larger screens
   ======================================== */

@media (min-width: 1024px) {
    .max-w-2xl {
        max-width: 56rem !important; /* 896px - matches max-w-4xl */
    }
}
@media (min-width: 1280px) {
    .max-w-2xl {
        max-width: 64rem !important; /* 1024px - matches max-w-5xl */
    }
}
@media (min-width: 1536px) {
    .max-w-2xl {
        max-width: 72rem !important; /* 1152px - matches max-w-6xl */
    }
}

/* Print styles */
@media print {
    .no-print { display: none !important; }
    body { background: white; }
}
