/**
 * Public Styles for Restaurant Menu Manager
 */

/* Base Menu Styles */
.locket-menu-wrapper,
.locket-section-wrapper,
.locket-featured-items-wrapper {
    margin: 20px 0;
}

.locket-menu-title,
.locket-section-title,
.locket-widget-title {
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
}

.locket-menu-description,
.locket-section-description {
    font-size: 1.1em;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Menu Section Styles */
.locket-menu-section {
    margin-bottom: 40px;
    margin-top: 24px;
}

.locket-section-title {
    font-size: 1.8em;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
    text-align: center;
}

.locket-section-items {
    margin-top: 20px;
}

/* Menu Item Styles */
.locket-menu-item {
    margin-bottom: 25px;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

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

.locket-item-image {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    overflow: hidden;
    border-radius: 8px;
}

.locket-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.locket-item-content {
    flex: 1;
    width: 100%;
}

.locket-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
    width: 100%;
}

.locket-item-title {
    font-size: 1.2em;
    font-weight: 600;
    margin: 0;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.locket-featured-star {
    color: #ffc107;
    font-size: 1.1em;
}

.locket-item-price {
    font-size: 1.1em;
    font-weight: bold;
    color: #2c5aa0;
    white-space: nowrap;
}

.locket-item-description {
    color: #666;
    line-height: 1.5;
    margin-bottom: 10px;
}

.locket-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

/* Dietary Badges */
.locket-dietary-badge {
    display: inline-block;
    background: #f8f9fa;
    color: #495057;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.locket-dietary-badge.vegetarian {
    background: #d1e7dd;
    color: #0f5132;
}

.locket-dietary-badge.vegan {
    background: #d4edda;
    color: #155724;
}

.locket-dietary-badge.gluten-free {
    background: #fff3cd;
    color: #856404;
}

.locket-dietary-badge.dairy-free {
    background: #cce5ff;
    color: #0066cc;
}

.locket-dietary-badge.nut-free {
    background: #ffe6cc;
    color: #cc6600;
}

.locket-dietary-badge.spicy {
    background: #f8d7da;
    color: #721c24;
}

/* Featured Badge */
.locket-featured-badge {
    display: inline-block;
    background: #f8f9fa;
    color: #6c757d;
    padding: 3px 6px;
    font-size: 0.75em;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-right: 4px;
}

/* PDF Download Styles */
.locket-pdf-download-wrapper {
    margin: 15px 0;
    text-align: left;
}

.locket-pdf-download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    color: #666;
    text-decoration: none;
    padding: 6px 8px;
    border-radius: 4px;
    font-weight: 400;
    font-size: 0.9em;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.locket-pdf-download:hover {
    background: #f5f5f5;
    color: #333;
    text-decoration: none;
    border-color: #ddd;
}

.locket-pdf-download:focus {
    outline: 2px solid #2c5aa0;
    outline-offset: 2px;
}

.locket-pdf-icon {
    font-size: 1em;
    opacity: 0.7;
}

.locket-pdf-text {
    font-size: 0.9em;
}

/* PDF Download Positioning */
.locket-section-wrapper,
.locket-menu-wrapper {
    position: relative;
}

.locket-pdf-float-left {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 10;
}

.locket-pdf-float-right {
    position: absolute;
    right: 0;
    top: 0;
    z-index: 10;
}

/* Clear floats after PDF download */
.locket-section-wrapper::after,
.locket-menu-wrapper::after {
    content: '';
    display: table;
    clear: both;
}

/* Spice Level Display */
.locket-spice-level {
    color: #dc3545;
    font-size: 0.9em;
}

.locket-spice-level .locket-spice-icon {
    color: #ff6b6b;
}

/* Layout Variations */
.locket-layout-classic .locket-menu-item {
    flex-direction: row;
    text-align: left;
}

.locket-layout-modern .locket-menu-item {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.locket-layout-modern .locket-menu-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

/* Grid Layout */
.locket-layout-grid .locket-section-items {
    display: grid;
    gap: 20px;
}

.locket-layout-grid.locket-columns-1 .locket-section-items {
    grid-template-columns: 1fr;
}

.locket-layout-grid.locket-columns-2 .locket-section-items {
    grid-template-columns: repeat(2, 1fr);
}

.locket-layout-grid.locket-columns-3 .locket-section-items {
    grid-template-columns: repeat(3, 1fr);
}

.locket-layout-grid.locket-columns-4 .locket-section-items {
    grid-template-columns: repeat(4, 1fr);
}

.locket-layout-grid .locket-menu-item {
    flex-direction: column;
    text-align: center;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 0;
}

.locket-layout-grid .locket-item-image {
    width: 100%;
    height: 150px;
    margin-bottom: 15px;
}

.locket-layout-grid .locket-item-header {
    flex-direction: column;
    text-align: center;
    gap:2px;
}

/* Featured Items Widget */
.locket-featured-items {
    display: grid;
    gap: 20px;
}

.locket-featured-items.locket-columns-1 {
    grid-template-columns: 1fr;
}

.locket-featured-items.locket-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.locket-featured-items.locket-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.locket-featured-items.locket-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.locket-featured-item {
    background: #fff;
    padding: 20px;
}



.locket-featured-item .locket-item-image {
    width: 100%;
    height: 200px;
    margin-bottom: 15px;
}

.locket-featured-item .locket-item-title {
    font-size: 1.3em;
    margin-bottom: 10px;
}

.locket-featured-item .locket-item-price {
    font-size: 1.2em;
    margin-bottom: 10px;
}

.locket-featured-item .locket-item-description {
    font-size: 0.9em;
    margin-bottom: 15px;
}

/* List Layout */
.locket-layout-list .locket-menu-item {
    flex-direction: row;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.locket-layout-list .locket-item-image {
    width: 60px;
    height: 60px;
}

.locket-layout-list .locket-item-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

/* Carousel Layout (when JavaScript is enabled) */
.locket-layout-carousel {
    position: relative;
    overflow: hidden;
}

.locket-layout-carousel .locket-section-items,
.locket-layout-carousel .locket-featured-items {
    display: flex;
    transition: transform 0.3s ease;
}

.locket-layout-carousel .locket-menu-item,
.locket-layout-carousel .locket-featured-item {
    flex: 0 0 300px;
    margin-right: 20px;
}

.locket-carousel-nav {
    text-align: center;
    margin-top: 20px;
}

.locket-carousel-btn {
    background: #2c5aa0;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    margin: 0 5px;
    font-size: 14px;
}

.locket-carousel-btn:hover {
    background: #1d4084;
}

.locket-carousel-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Load More Button */
.locket-load-more {
    text-align: center;
    margin-top: 30px;
}

.locket-load-more-btn {
    background: #2c5aa0;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s ease;
}

.locket-load-more-btn:hover {
    background: #1d4084;
}

/* Loading States */
.locket-loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.locket-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #2c5aa0;
    border-radius: 50%;
    border-top-color: transparent;
    animation: locket-spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes locket-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .locket-layout-grid.locket-columns-3 .locket-section-items,
    .locket-layout-grid.locket-columns-4 .locket-section-items {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .locket-featured-items.locket-columns-3,
    .locket-featured-items.locket-columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .locket-menu-item {
        flex-direction: column;
        text-align: left;
    }
    
    .locket-item-header {
        flex-direction: column;
        gap: 2px;
    }
    
    .locket-item-image {
        width: 100%;
        height: 200px;
        margin-bottom: 15px;
    }
    
    .locket-layout-carousel .locket-menu-item,
    .locket-layout-carousel .locket-featured-item {
        flex: 0 0 280px;
    }
}

@media screen and (max-width: 480px) {
    .locket-layout-grid.locket-columns-2 .locket-section-items,
    .locket-layout-grid.locket-columns-3 .locket-section-items,
    .locket-layout-grid.locket-columns-4 .locket-section-items {
        grid-template-columns: 1fr;
    }
    
    .locket-featured-items.locket-columns-2,
    .locket-featured-items.locket-columns-3,
    .locket-featured-items.locket-columns-4 {
        grid-template-columns: 1fr;
    }
    
    .locket-menu-title,
    .locket-section-title,
    .locket-widget-title {
        font-size: 1.5em;
        text-align: center;
    }
    
    .locket-menu-description,
    .locket-section-description {
        text-align: center;
    }
    
    .locket-menu-hours {
        text-align: center;
    }
    
    .locket-layout-carousel .locket-menu-item,
    .locket-layout-carousel .locket-featured-item {
        flex: 0 0 250px;
    }
}

/* Print Styles */
@media print {
    .locket-carousel-nav,
    .locket-load-more {
        display: none;
    }
    
    .locket-menu-item,
    .locket-featured-item {
        box-shadow: none;
        border: 1px solid #000;
        break-inside: avoid;
    }
    
    .locket-layout-grid .locket-section-items,
    .locket-featured-items {
        grid-template-columns: 1fr;
    }
}

/* Accessibility Improvements */
.locket-menu-item:focus-within,
.locket-featured-item:focus-within {
    outline: 2px solid #2c5aa0;
    outline-offset: 2px;
}

.locket-carousel-btn:focus,
.locket-load-more-btn:focus {
    outline: 2px solid #2c5aa0;
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .locket-menu-item,
    .locket-featured-item {
        border: 2px solid #000;
    }
    
    .locket-dietary-badge {
        border: 1px solid #000;
    }
    
    .locket-item-price {
        color: #000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .locket-featured-item,
    .locket-layout-modern .locket-menu-item,
    .locket-layout-carousel .locket-section-items,
    .locket-layout-carousel .locket-featured-items {
        transition: none;
    }
    
    .locket-loading::after {
        animation: none;
    }
}
