/* MARC Estacionamiento - Main Stylesheet */

/* Material Symbols Font Settings */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Glass Effect Headers */
.glass-header {
    background: rgba(244, 251, 240, 0.8);
    backdrop-filter: blur(12px);
}

.glass-nav {
    background: rgba(244, 251, 240, 0.8);
    backdrop-filter: blur(12px);
}

/* Base Body Styles */
body {
    background-color: #f4fbf0;
    color: #171d17;
    font-family: 'Inter', sans-serif;
}

/* Bento Grid Layout */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.5rem;
}

/* HTMX Indicators */
.htmx-indicator {
    display: none;
}

.htmx-request .htmx-indicator {
    display: inline;
}

.htmx-request.htmx-indicator {
    display: inline;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #e9f0e5;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #bdcaba;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6e7a6c;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

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

/* Focus Styles */
input:focus,
select:focus,
textarea:focus,
button:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 107, 43, 0.2);
}

/* Transition Utilities */
.transition-base {
    transition: all 0.2s ease-in-out;
}

.hover-lift:hover {
    transform: translateY(-2px);
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
}

/* PWA install banner */
.hidden {
    display: none !important;
}

/* ================================================================
 * SAFEGUARD MÍNIMO: Sólo los breakpoints responsive CRÍTICOS del
 * layout. NO duplicamos clases de Tailwind para colores, paddings,
 * márgenes, fondos, etc. — el CDN las genera correctamente.
 * Sólo aseguramos que los puntos de corte sm/md se aplicar aunque
 * el CDN JIT falle al detectarlas al escanear el DOM.
 * ================================================================ */

/* sm: >= 640px — logo brand "Estacionamiento" */
@media (min-width: 640px) {
    .sm\:block { display: block !important; }
    .sm\:flex  { display: flex  !important; }
    .sm\:inline { display: inline !important; }
}

/* md: >= 768px — sidenav + topnav tabs + main offset + ocultar bottom-nav */
@media (min-width: 768px) {
    .md\:flex   { display: flex   !important; }
    .md\:block  { display: block  !important; }
    .md\:hidden { display: none   !important; }
    .md\:ml-64  { margin-left: 16rem !important; }
}

/* === PWA Offline freshness badge (posición absolute, no depende de Tailwind) === */
.marc-offline-freshness-badge {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 60;
    background: rgba(23, 29, 23, 0.92);
    color: #ecf3e8;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    pointer-events: none;
    box-shadow: 0 10px 30px rgba(23, 29, 23, 0.15);
    backdrop-filter: blur(6px);
}
.marc-offline-freshness-badge.stale {
    background: rgba(186, 26, 26, 0.95);
    color: #ffffff;
}

.pwa-install-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 1100;
}

.pwa-install-banner__content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.125rem;
    border: 1px solid rgba(0, 107, 43, 0.12);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 16px 40px rgba(23, 29, 23, 0.14);
    backdrop-filter: blur(12px);
}

.pwa-install-banner__copy {
    flex: 1 1 220px;
}

.pwa-install-banner__title {
    margin: 0 0 0.25rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: #171d17;
}

.pwa-install-banner__message {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.45;
    color: #526772;
}

.pwa-install-banner__actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.pwa-install-banner__button,
.pwa-install-banner__dismiss {
    border: 0;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.pwa-install-banner__button:hover,
.pwa-install-banner__dismiss:hover {
    transform: translateY(-1px);
}

.pwa-install-banner__button {
    padding: 0.8rem 1.15rem;
    background: #006b2b;
    color: #ffffff;
}

.pwa-install-banner__dismiss {
    padding: 0.75rem 0.95rem;
    background: transparent;
    color: #4c616c;
}

@media (min-width: 768px) {
    .pwa-install-banner {
        left: auto;
        right: 24px;
        bottom: 24px;
        width: min(460px, calc(100vw - 48px));
    }
}
