/* Custom styles to complement TailwindCSS and match menu.png styling */

/* Selective smooth transitions - theme colors are instant, interactions are smooth */
.cocktail-item,
.nav-link,
#theme-toggle,
#back-to-top,
footer button,
.modal-btn {
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
}

/* Modal transitions for interactions only */
#order-modal,
#about-modal {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#order-modal-content,
#about-modal-content {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#notification {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Custom font loading and fallbacks */
body {
    font-display: swap;
}

/* Header styling to match the menu aesthetic */
header {
    position: relative;
}

/* Logo styling with proper aspect ratio */
#logo,
header img {
    object-fit: contain;
    max-width: 100%;
}

/* Section headers with elegant typography */
section h2 {
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

/* Cocktail item styling for better readability */
.cocktail-item {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.dark .cocktail-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cocktail-item:last-child {
    border-bottom: none;
}

/* Hover effects disabled - cocktail items are no longer clickable
.cocktail-item:hover {
    transform: translateX(8px);
    background-color: rgba(0, 0, 0, 0.02);
}

.dark .cocktail-item:hover {
    background-color: rgba(255, 255, 255, 0.02);
}
*/

/* Price alignment and styling */
.cocktail-item span {
    min-width: fit-content;
    margin-left: 1rem;
    white-space: nowrap;
}

/* User display styling */
#user-display {
    /* Force hide the user display element */
    display: none !important;
    
    /* Backdrop blur for better visibility over content */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    
    /* Improved shadow for depth */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
    
    /* Ensure stays above all content */
    z-index: 9999;
    
    /* Min height for better touch targets */
    min-height: 44px;
    
    /* Max width to prevent overflow */
    max-width: calc(100vw - 120px);
    
    /* Text overflow handling */
    white-space: nowrap;
}

.dark #user-display {
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15), 0 2px 4px rgba(255, 255, 255, 0.1);
}

#user-display:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2), 0 4px 8px rgba(0, 0, 0, 0.15);
}

.dark #user-display:hover {
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.2), 0 4px 8px rgba(255, 255, 255, 0.15);
}

#user-name {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Theme toggle button enhanced styling - matching back-to-top button */
#theme-toggle {
    /* Enhanced touch target for mobile */
    min-height: 56px;
    min-width: 56px;
    
    /* Backdrop blur for better visibility over content */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    
    /* Improved shadow for depth */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
    
    /* Smooth transitions for interactions only, not theme colors */
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Ensure button stays above all content */
    z-index: 9999;
}

.dark #theme-toggle {
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15), 0 2px 4px rgba(255, 255, 255, 0.1);
}

/* Enhanced hover and focus states */
#theme-toggle:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2), 0 4px 8px rgba(0, 0, 0, 0.15);
}

.dark #theme-toggle:hover {
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.2), 0 4px 8px rgba(255, 255, 255, 0.15);
}

#theme-toggle:active {
    transform: scale(1.05) translateY(-1px);
    transition-duration: 0.0s;
}

/* Accessibility improvements for theme toggle */
#theme-toggle:focus-visible {
    outline: 3px solid;
    outline-color: currentColor;
    outline-offset: 3px;
}

/* Typography enhancements */
.font-jersey {
    font-weight: 400;
    letter-spacing: 0.15em;
}

.font-poiret {
    font-weight: 400;
    letter-spacing: 0.05em;
}

.font-merriweather {
    line-height: 1.6;
}

/* Responsive typography scaling */
@media (max-width: 640px) {
    .cocktail-item h3 {
        font-size: 1.125rem;
        line-height: 1.4;
    }
    
    .cocktail-item p {
        font-size: 0.875rem;
        line-height: 1.5;
    }
    
    section h2 {
        font-size: 1.875rem;
        line-height: 1.2;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    .cocktail-item h3 {
        font-size: 1.25rem;
    }
    
    section h2 {
        font-size: 2.25rem;
    }
}

@media (min-width: 1025px) {
    .cocktail-item h3 {
        font-size: 1.5rem;
    }
    
    section h2 {
        font-size: 3rem;
    }
    
    .cocktail-item {
        padding: 1.5rem 0;
    }
}

/* Section dividers removed per user request */

/* Enhanced focus states for accessibility */
#theme-toggle:focus {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* Navigation menu styling */
nav.sticky {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.nav-link {
    position: relative;
    text-decoration: none !important;
    color: inherit;
    padding: 0.5rem 0;
}

.nav-link:hover {
    text-decoration: none !important;
    color: inherit;
    transform: translateY(-2px);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: currentColor;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Active section highlighting */
.nav-link.active {
    color: #666;
}

.dark .nav-link.active {
    color: #ccc;
}

/* Smooth scrolling for better UX */
html {
    scroll-behavior: smooth;
}

/* Offset for sticky navigation */
section {
    scroll-margin-top: 5rem;
}

/* Print styles */
@media print {
    #theme-toggle {
        display: none;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .cocktail-item {
        break-inside: avoid;
    }
}

/* Font loading optimization handled by Google Fonts with font-display: swap */

/* Back to Top Button - Mobile-first responsive design */
#back-to-top {
    /* Enhanced touch target for mobile */
    min-height: 56px;
    min-width: 56px;
    
    /* Backdrop blur for better visibility over content */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    
    /* Improved shadow for depth */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
    
    /* Smooth transitions for interactions only, not theme colors */
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Ensure button stays above all content */
    z-index: 9999;
    
    /* Initially hidden - will be shown by JavaScript when scrolled */
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8);
}

.dark #back-to-top {
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15), 0 2px 4px rgba(255, 255, 255, 0.1);
}

/* Enhanced hover and focus states */
#back-to-top:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2), 0 4px 8px rgba(0, 0, 0, 0.15);
}

.dark #back-to-top:hover {
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.2), 0 4px 8px rgba(255, 255, 255, 0.15);
}

#back-to-top:active {
    transform: scale(1.05) translateY(-1px);
    transition-duration: 0.1s;
}

/* Mobile optimizations */
@media (max-width: 640px) {
    #back-to-top {
        /* Larger touch target for mobile */
        width: 60px;
        height: 60px;
        bottom: 20px;
        right: 20px;
        
        /* Slightly larger icon for mobile */
    }
    
    #back-to-top svg {
        width: 28px;
        height: 28px;
    }
    
    #theme-toggle {
        /* Larger touch target for mobile */
        width: 60px;
        height: 60px;
    }
    
    #theme-toggle svg {
        width: 28px;
        height: 28px;
    }
    
    #user-display {
        /* Smaller padding on mobile */
        padding: 8px 12px;
        /* Adjust max width for mobile */
        max-width: calc(100vw - 140px);
        /* Slightly smaller font */
        font-size: 0.75rem;
    }
    
    #user-display svg {
        width: 16px;
        height: 16px;
    }
    
    #user-name {
        max-width: 100px;
    }
}

/* Tablet optimizations */
@media (min-width: 641px) and (max-width: 1024px) {
    #back-to-top {
        width: 56px;
        height: 56px;
        bottom: 24px;
        right: 24px;
    }
    
    #theme-toggle {
        width: 56px;
        height: 56px;
    }
}

/* Desktop optimizations */
@media (min-width: 1025px) {
    #back-to-top {
        width: 52px;
        height: 52px;
        bottom: 32px;
        right: 32px;
    }
    
    #theme-toggle {
        width: 52px;
        height: 52px;
    }
    
    /* Subtle hover animation for desktop */
    #back-to-top:hover {
        transform: scale(1.15) translateY(-3px);
    }
    
    #back-to-top.visible:hover {
        transform: scale(1.15) translateY(-3px);
    }
    
    #theme-toggle:hover {
        transform: scale(1.15) translateY(-3px);
    }
}

/* High DPI screen optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    #back-to-top {
        /* Sharper rendering on high DPI screens */
        transform: translateZ(0);
        -webkit-font-smoothing: antialiased;
    }
}

/* Accessibility improvements */
#back-to-top:focus-visible {
    outline: 3px solid;
    outline-color: currentColor;
    outline-offset: 3px;
}

/* Show back-to-top button when visible */
#back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    #back-to-top, #theme-toggle {
        transition: none;
    }
    
    #back-to-top:hover, #theme-toggle:hover {
        transform: none;
    }
    
    #back-to-top.visible {
        transform: none;
    }
}

/* Cocktail Order Modal Styles */
#order-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10000;
}

#order-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.3s ease-out;
}

#order-modal-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    text-align: center;
}

.dark #order-modal-content {
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

#order-modal.show #order-modal-content {
    transform: scale(1);
}

#order-modal h3 {
    margin-bottom: 1rem;
    color: inherit;
}

#order-modal p {
    margin-bottom: 2rem;
    color: #666;
}

.dark #order-modal p {
    color: #ccc;
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.modal-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.modal-btn-primary {
    background: #000;
    color: white;
}

.dark .modal-btn-primary {
    background: white;
    color: black;
}

.modal-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.dark .modal-btn-primary:hover {
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

.modal-btn-secondary {
    background: transparent;
    color: #666;
    border: 2px solid #ddd;
}

.dark .modal-btn-secondary {
    color: #ccc;
    border-color: #444;
}

.modal-btn-secondary:hover {
    background: #f5f5f5;
    border-color: #999;
}

.dark .modal-btn-secondary:hover {
    background: #333;
    border-color: #666;
}

/* Notification Styles */
#notification {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #000;
    color: white;
    padding: 1rem 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    max-width: 90%;
    text-align: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.dark #notification {
    background: white;
    color: black;
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.3);
}

#notification.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

#notification p {
    margin: 0;
    font-weight: 600;
}

/* Mobile responsive adjustments for modal */
@media (max-width: 640px) {
    #order-modal-content, #about-modal-content {
        padding: 1.5rem;
        margin: 1rem;
        max-height: 85vh;
    }
    
    .modal-buttons {
        flex-direction: column;
    }
    
    .modal-btn {
        width: 100%;
    }
    
    footer {
        padding: 2rem 0;
        margin-top: 1.5rem;
    }
    
    footer p {
        font-size: 0.875rem;
        line-height: 1.5;
    }
    
    footer button {
        font-size: 0.875rem;
        padding: 0.5rem 1.25rem;
    }
    
    #notification {
        bottom: 80px;
        left: 1rem;
        right: 1rem;
        transform: translateY(100px);
        max-width: none;
    }
    
    #notification.show {
        transform: translateY(0);
    }
}

/* Animation keyframes */
@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* About Modal Styles - uses same styling as order modal */
#about-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10000;
}

#about-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.3s ease-out;
}

#about-modal-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    text-align: center;
}

.dark #about-modal-content {
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

#about-modal.show #about-modal-content {
    transform: scale(1);
}

#about-modal h3 {
    margin-bottom: 1rem;
    color: inherit;
}

#about-modal p {
    margin-bottom: 2rem;
    color: #666;
    line-height: 1.6;
}

.dark #about-modal p {
    color: #ccc;
}

/* About Modal Enhanced Styling */
.credits-section {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 1rem;
}

.dark .credits-section {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#about-modal .credit-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0;
    font-size: 0.95rem;
    font-weight: normal;
}

#about-modal .credit-label {
    font-weight: 600 !important;
    color: inherit;
    min-width: fit-content;
}

.bartenders-section {
    margin: 1rem 0;
}

.bartenders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
}

#about-modal .bartender-item {
    position: relative;
    padding: 0.375rem 0.75rem;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: normal !important;
    text-align: left;
    transition: all 0.2s ease;
    display: block;
}

.dark #about-modal .bartender-item {
    background: rgba(255, 255, 255, 0.05);
}

#about-modal .bartender-item::before {
    color: #666;
    font-weight: bold;
    display: inline;
}

.dark #about-modal .bartender-item::before {
    color: #ccc;
}

#about-modal .bartender-item:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.dark #about-modal .bartender-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.host-note {
    font-style: italic;
    font-size: 0.875rem;
    color: #666;
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.dark .host-note {
    color: #ccc;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Mobile responsive adjustments for about modal */
@media (max-width: 640px) {
    .bartenders-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.375rem;
    }
    
    #about-modal .bartender-item {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }
    
    #about-modal .credit-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.125rem;
    }
    
    #about-modal .credit-label {
        font-size: 0.875rem;
    }
}

/* Footer styling */
footer {
    margin-top: 2rem;
}

footer button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

footer button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.dark footer button:hover {
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.15);
}

footer button:active {
    transform: translateY(-1px);
}

/* Enhanced cocktail item clickability - DISABLED per user request */
/* 
.cocktail-item {
    cursor: pointer;
    position: relative;
}

.cocktail-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -1rem;
    right: -1rem;
    bottom: 0;
    background: transparent;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.cocktail-item:hover::before {
    background: rgba(0, 0, 0, 0.02);
}

.dark .cocktail-item:hover::before {
    background: rgba(255, 255, 255, 0.02);
}

/* Focus states for accessibility */
/* 
.cocktail-item:focus {
    outline: 2px solid;
    outline-color: currentColor;
    outline-offset: 2px;
    border-radius: 4px;
}
*/

/* Reduce motion for modal and notification */
@media (prefers-reduced-motion: reduce) {
    #order-modal, #order-modal-content, #about-modal, #about-modal-content, #notification {
        transition: none;
        animation: none;
    }
    
    footer button {
        transition: none;
    }
    
    footer button:hover, footer button:active {
        transform: none;
    }
}
