/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */
/* =============================================
   St. Augustine's — Craft Brew House & Kitchen
   Custom Styles
   ============================================= */

/* Custom Font */
@font-face {
    font-family: 'BrothBolAlt';
    src: url("/assets/BrothBolAlt-73e9e62f.ttf") format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Base */
body {
    font-family: 'Inter', system-ui, sans-serif;
    position: relative;
}
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("/assets/st_aug_logo_only_head_white-12ffe7b2.png");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 70%;
    opacity: 0.18;
    pointer-events: none;
    z-index: -1;
}
.font-display { font-family: 'BrothBolAlt', Georgia, serif; }

/* Arbitrary value replacements (Tailwind v4 can't extract bracket values from .erb) */
.leading-tight-hero { line-height: 0.9; }
.hero-glow { width: 600px; height: 600px; }
.z-modal { z-index: 100; }

/* Nav Logo */
.nav-logo {
    opacity: 0.9;
    transition: opacity 0.3s ease, filter 0.3s ease;
}
.nav-logo:hover {
    opacity: 1;
    filter: drop-shadow(0 0 8px rgba(212, 160, 23, 0.4));
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #1a1a1a; }
::-webkit-scrollbar-thumb { background: #d4a017; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #b8860b; }

/* ====== Animations ====== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes pour {
    0% { height: 0%; }
    100% { height: 100%; }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}
.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
    opacity: 0;
}
.animate-slide-down {
    animation: slideDown 0.5s ease-out forwards;
}
.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Animation delays */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }

/* ====== Scroll Reveal ====== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ====== Grain Texture Overlay ====== */
.grain::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1;
}

/* ====== Beer Tap Counter Gradient ====== */
.tap-count {
    background: linear-gradient(to bottom, #d4a017, #b8860b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ====== Hover Lift Effect ====== */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

/* ====== Gold Gradient Text ====== */
.gold-text {
    background: linear-gradient(to bottom, #fde047, #d4a017, #b8860b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ====== Menu Category Active Line ====== */
.menu-tab.active {
    color: #d4a017;
    border-bottom-color: #d4a017;
}


/* ====== Parallax-lite ====== */
.parallax-bg {
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
}
@media (max-width: 768px) {
    .parallax-bg {
        background-attachment: scroll;
    }
}

/* ====== Nav Blur ====== */
.nav-blur {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

/* ====== Tap Table ====== */
.beer-color-swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.3), 0 0 0 3px rgba(255, 255, 255, 0.06), 0 1px 3px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
    outline: 1px solid rgba(255, 255, 255, 0.08);
    outline-offset: 2px;
}
.beer-color-dark {
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.3), 0 0 0 3px rgba(255, 255, 255, 0.1), 0 1px 3px rgba(0, 0, 0, 0.2);
}

.tap-style-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    background: rgba(212, 160, 23, 0.08);
    color: #d4a017;
    border: 1px solid rgba(212, 160, 23, 0.15);
    white-space: nowrap;
}

.tap-row {
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    border-left: 3px solid transparent;
}
.tap-row:hover {
    background-color: rgba(212, 160, 23, 0.08) !important;
    border-left: 3px solid #d4a017;
}
.tap-row:last-child {
    border-bottom: none;
}

/* Sort header active underline */
.tap-sort-header.text-gold-500 {
    color: #d4a017;
}

/* ====== Style Filter Buttons ====== */
.style-filter-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: #a0a0a0;
    background: rgba(40, 40, 40, 0.6);
    border: 1px solid rgba(56, 56, 56, 0.8);
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.style-filter-btn:hover {
    color: #d4a017;
    border-color: rgba(212, 160, 23, 0.3);
    background: rgba(212, 160, 23, 0.05);
}
.style-filter-btn.active {
    color: #1a1a1a;
    background: #d4a017;
    border-color: #d4a017;
    font-weight: 600;
}

/* ====== Keg Remaining Indicator ====== */
.keg-remaining-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 100px;
}
.keg-remaining-track {
    flex: 1;
    height: 6px;
    border-radius: 9999px;
    overflow: hidden;
    position: relative;
}
.keg-remaining-bar {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.6s ease-out;
}
.keg-remaining-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #a0a0a0;
    min-width: 32px;
    text-align: right;
}

/* ====== Map Styling ====== */
#google-map {
    background: #1a1a1a;
}

/* Leaflet zoom controls */
.leaflet-control-zoom a {
    background: #282828 !important;
    color: #a0a0a0 !important;
    border-color: #383838 !important;
    width: 32px !important;
    height: 32px !important;
    line-height: 32px !important;
    font-size: 16px !important;
    transition: all 0.2s ease;
}
.leaflet-control-zoom a:hover {
    background: #383838 !important;
    color: #d4a017 !important;
}
.leaflet-control-zoom {
    border: none !important;
    border-radius: 10px !important;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}

/* Leaflet attribution */
.leaflet-control-attribution {
    background: rgba(26, 26, 26, 0.7) !important;
    color: #505050 !important;
    font-size: 10px !important;
    padding: 2px 6px !important;
    border-radius: 4px 0 0 0 !important;
    backdrop-filter: blur(4px);
}

/* Leaflet popup */
.st-aug-popup .leaflet-popup-content-wrapper {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    padding: 4px;
}
.st-aug-popup .leaflet-popup-tip {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.st-aug-popup .leaflet-popup-close-button {
    color: #999 !important;
    font-size: 18px !important;
    padding: 6px 8px !important;
}
.st-aug-popup .leaflet-popup-close-button:hover {
    color: #d4a017 !important;
}

/* ====== Beer Detail Modal ====== */
.beer-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    pointer-events: none;
    transition: background 0.3s ease, backdrop-filter 0.3s ease;
    padding: 1rem;
}
.beer-modal-overlay.active {
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    pointer-events: auto;
}

.beer-modal {
    position: relative;
    background: #1a1a1a;
    border: 1px solid #383838;
    border-radius: 1.25rem;
    max-width: 640px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
    transform: scale(0.9) translateY(20px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.beer-modal-overlay.active .beer-modal {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.beer-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(40, 40, 40, 0.8);
    border: 1px solid #383838;
    color: #a0a0a0;
    cursor: pointer;
    transition: all 0.2s ease;
}
.beer-modal-close:hover {
    color: #d4a017;
    border-color: rgba(212, 160, 23, 0.3);
    background: rgba(212, 160, 23, 0.1);
}

.beer-modal-body {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 2rem 2rem 0;
}

.beer-modal-info {
    width: 100%;
}

.beer-modal-pint {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 1.5rem 1rem 0;
    background: radial-gradient(ellipse at center bottom, rgba(255, 255, 255, 0.06) 0%, transparent 70%);
    margin-top: 1rem;
}
.beer-modal-pint-img {
    max-width: 200px;
    height: auto;
    display: block;
    filter: drop-shadow(0 4px 16px rgba(255, 255, 255, 0.08)) drop-shadow(0 8px 24px rgba(0, 0, 0, 0.4));
}

.beer-modal-header {
    margin-bottom: 0.75rem;
}
.beer-modal-name {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 0.25rem;
}
.beer-modal-brewery {
    font-size: 0.95rem;
    font-weight: 600;
    color: #d4a017;
}
.beer-modal-location {
    font-size: 0.8rem;
    color: #b0b0b0;
    margin-top: 0.25rem;
}

.beer-modal-style {
    margin-bottom: 1rem;
}

.beer-modal-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.75rem 0;
    border-top: 1px solid #333333;
    border-bottom: 1px solid #333333;
}
.beer-modal-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 48px;
}
.beer-modal-stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}
.beer-modal-stat-label {
    font-size: 0.65rem;
    font-weight: 500;
    color: #9a9a9a;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.15rem;
}

.beer-modal-desc {
    font-size: 0.85rem;
    color: #c0c0c0;
    line-height: 1.6;
}

/* Modal scrollbar */
.beer-modal::-webkit-scrollbar { width: 6px; }
.beer-modal::-webkit-scrollbar-track { background: transparent; }
.beer-modal::-webkit-scrollbar-thumb { background: #383838; border-radius: 3px; }

/* Modal responsive */
@media (max-width: 480px) {
    .beer-modal-body {
        padding: 1.5rem 1.5rem 0;
    }
    .beer-modal-pint-img {
        max-width: 160px;
    }
    .beer-modal-name {
        font-size: 1.25rem;
    }
}

/* Tap table responsive: tighter on mobile */
@media (max-width: 640px) {
    .beer-color-swatch {
        width: 22px;
        height: 22px;
    }
    #tap-table th,
    #tap-table td {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

