/**
 * Custom CSS Override for Råbyrian Pizzeria
 * 
 * This file should be loaded AFTER live.css in your HTML files.
 * Use this file for customizations instead of modifying live.css directly.
 * 
 * Example HTML:
 *   <link rel="stylesheet" href="assets/css/live.css">
 *   <link rel="stylesheet" href="assets/css/custom.css">
 */

/* ============================================
   Custom Styles
   ============================================ */

/* Add your custom styles below this line */

/* ============================================
   Custom Color Overrides
   ============================================ */

/* Override primary colors using more specific selectors (no !important needed) */
#website .custom-primary {
    color: var(--color1, #292f36);
}

#website .custom-accent {
    color: var(--color2, #ffe66d);
    background-color: var(--color2, #ffe66d);
}

/* ============================================
   Custom Button Enhancements
   ============================================ */

/* Enhanced button styles with better hover effects */
#website .btn-custom-primary {
    background-color: var(--color2, #ffe66d);
    color: var(--color1, #292f36);
    border: 2px solid var(--color2, #ffe66d);
    border-radius: 5px;
    padding: 12px 24px;
    font-weight: 600;
    transition: all 0.3s ease;
}

#website .btn-custom-primary:hover {
    background-color: var(--color2_125, #bfad52);
    border-color: var(--color2_125, #bfad52);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* ============================================
   Responsive Enhancements
   ============================================ */

/* Better mobile spacing */
@media (max-width: 768px) {
    #website .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    #website .custom-section {
        padding: 20px 15px;
    }
    
    /* Improve touch targets on mobile */
    #website a, #website button {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Tablet optimizations */
@media (min-width: 769px) and (max-width: 1024px) {
    #website .custom-section {
        padding: 30px 20px;
    }
}

/* ============================================
   Performance Optimizations
   ============================================ */

/* Use CSS containment for better performance */
#website .custom-widget,
#website .kedit {
    contain: layout style paint;
}

/* Optimize animations for better performance */
#website * {
    will-change: auto;
}

#website .btn-custom-primary,
#website a:hover {
    will-change: transform, box-shadow;
}

/* Reduce repaints on scroll */
#website #headerMenu {
    contain: layout style paint;
}

/* ============================================
   Accessibility Improvements
   ============================================ */

/* Enhanced focus styles for better keyboard navigation */
#website *:focus-visible {
    outline: 3px solid var(--color2, #ffe66d);
    outline-offset: 3px;
    border-radius: 2px;
}

/* Ensure buttons and links are clearly focusable */
#website a:focus,
#website button:focus,
#website input:focus,
#website textarea:focus,
#website select:focus {
    outline: 3px solid var(--color2, #ffe66d);
    outline-offset: 2px;
}

/* Improve contrast for better readability */
#website .text-low-contrast {
    color: rgba(0, 0, 0, 0.85);
}

.koThemeDark #website .text-low-contrast {
    color: rgba(255, 255, 255, 0.9);
}

/* Skip to main content link for screen readers */
#website .skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color1, #292f36);
    color: var(--color2, #ffe66d);
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

#website .skip-link:focus {
    top: 0;
}

/* ============================================
   Utility Classes
   ============================================ */

/* Hide elements visually but keep for screen readers */
#website .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Smooth scrolling */
#website html {
    scroll-behavior: smooth;
}

/* Loading state */
#website .loading {
    opacity: 0.6;
    pointer-events: none;
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
    /* Hide navigation and non-essential elements */
    #website #headerMenu,
    #website nav,
    #website .no-print,
    #website .btn,
    #website button {
        display: none;
    }
    
    /* Optimize colors for printing */
    #website {
        color: #000;
        background: #fff;
    }
    
    #website a {
        color: #000;
        text-decoration: underline;
    }
    
    /* Ensure links show URLs */
    #website a[href]:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }
    
    /* Avoid page breaks in content sections */
    #website section {
        page-break-inside: avoid;
    }
    
    /* Print page margins */
    @page {
        margin: 2cm;
    }
}

/* ============================================
   Menu Editing Interface
   ============================================ */

/* Edit mode banner */
.menu-edit-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    z-index: 10000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.menu-edit-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.menu-edit-banner span {
    font-weight: 600;
    font-size: 16px;
}

.btn-close-edit {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    color: white;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-close-edit:hover {
    background: white;
    color: #667eea;
}

/* Editable menu items */
.menu-item-editable {
    position: relative;
    border: 2px dashed transparent;
    transition: all 0.3s ease;
}

.menu-item-editable:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.menu-edit-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #667eea;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
    z-index: 10;
}

.menu-item-editable:hover .menu-edit-icon {
    opacity: 1;
}

/* Editable content styles */
.editable {
    outline: none;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    min-height: 20px;
}

.editable:focus {
    background: rgba(102, 126, 234, 0.1);
    border: 2px solid #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.menu-item-name.editable:focus {
    font-weight: 600;
}

.menu-item-price.editable:focus {
    color: #667eea;
    font-weight: 700;
}

/* Save notification */
.menu-save-notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #10b981;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 10001;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    font-weight: 600;
}

.menu-save-notification.show {
    opacity: 1;
    transform: translateY(0);
}

/* Adjust page header when edit banner is visible */
body:has(.menu-edit-banner) .navbar,
body:has(.menu-edit-banner) .page-header {
    margin-top: 60px;
}

/* Make category headers editable */
.menu-category-header h2.editable {
    padding: 8px 12px;
    border-radius: 6px;
}

.menu-category-header h2.editable:focus {
    background: rgba(102, 126, 234, 0.1);
    border: 2px solid #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

