/* Restaurant Menu Widget Styles - Tabs Version */
/* rm- prefix oznacza "restaurant menu" aby uniknąć konfliktów z innymi klasami */

.restaurant-menu-widget {
    padding: 20px 0;
}

/* Tabs Navigation */
.restaurant-menu-widget .rm-tabs-nav {
    margin-bottom: 40px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 0;
}

.restaurant-menu-widget .rm-tab-button {
    background: #f8f9fa;
    border: 1px solid #ddd;
    color: #666;
    padding: 12px 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px 8px 0 0;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: -2px;
    border-bottom: 2px solid transparent;
    outline: none;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.restaurant-menu-widget .rm-tab-icon {
    font-size: 14px;
}

.restaurant-menu-widget .rm-tab-text {
    line-height: 1;
}

.restaurant-menu-widget .rm-tab-button:hover {
    background: #e9ecef;
    color: #333;
    transform: translateY(-2px);
}

.restaurant-menu-widget .rm-tab-button.active {
    background: #fff;
    color: #000;
    border-color: #ddd;
    border-bottom-color: #000;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.restaurant-menu-widget .rm-tab-button:focus {
    box-shadow: 0 0 0 2px rgba(201, 48, 44, 0.3);
}

/* Tabs Content */
.restaurant-menu-widget .rm-tabs-content {
    position: relative;
}

.restaurant-menu-widget .rm-tab-pane {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.restaurant-menu-widget .rm-tab-pane.active {
    display: block;
}

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

/* Menu Items Wrapper */
.restaurant-menu-widget .rm-items-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Grid Layout */
.restaurant-menu-widget .rm-items-wrapper.columns-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.restaurant-menu-widget .rm-items-wrapper.columns-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* Dish Item (wcześniej menu-item) */
.restaurant-menu-widget .rm-dish-item {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.restaurant-menu-widget .rm-dish-item:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transform: translateY(-3px);
}

/* Layout Classic */
.restaurant-menu-widget.layout-classic .rm-dish-item {
    display: flex;
    align-items: flex-start;
    gap: 0;
    padding: 0;
}

.restaurant-menu-widget.layout-classic .rm-dish-image {
    flex-shrink: 0;
    width: 200px;
    height: 200px;
}

.restaurant-menu-widget.layout-classic .rm-dish-content {
    flex: 1;
    padding: 20px;
}

/* Layout Modern */
.restaurant-menu-widget.layout-modern .rm-dish-item {
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: 0;
}

.restaurant-menu-widget.layout-modern .rm-dish-image {
    width: 100%;
    height: 320px;
    margin-bottom: 0;
}

.restaurant-menu-widget.layout-modern .rm-dish-content {
    padding: 20px;
}

/* Layout Grid */
.restaurant-menu-widget.layout-grid .rm-dish-item {
    text-align: center;
    padding: 0;
}

.restaurant-menu-widget.layout-grid .rm-dish-image {
    width: 100%;
    height: 260px;
    margin-bottom: 0;
}

.restaurant-menu-widget.layout-grid .rm-dish-content {
    padding: 20px;
}

.restaurant-menu-widget.layout-grid .rm-dish-header {
    flex-direction: column;
    align-items: center;
}

.restaurant-menu-widget.layout-grid .rm-dish-price {
    margin-top: 10px;
}

/* Dish Image */
.restaurant-menu-widget .rm-dish-image {
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Layout-specific image styling */
.restaurant-menu-widget.layout-classic .rm-dish-image {
    border-radius: 12px 0 0 12px;
}

.restaurant-menu-widget.layout-modern .rm-dish-image {
    border-radius: 12px 12px 0 0;
}

.restaurant-menu-widget.layout-grid .rm-dish-image {
    border-radius: 12px 12px 0 0;
}

.restaurant-menu-widget .rm-dish-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: all 0.4s ease;
    filter: brightness(1.02) contrast(1.05) saturate(1.1);
    background: #f8f9fa;
}

.restaurant-menu-widget .rm-dish-item:hover .rm-dish-image {
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.restaurant-menu-widget .rm-dish-item:hover .rm-dish-image img {
    transform: scale(1.03);
    filter: brightness(1.05) contrast(1.08) saturate(1.15);
}

/* Dish Content */
.restaurant-menu-widget .rm-dish-content {
    flex: 1;
}

.restaurant-menu-widget .rm-dish-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 10px;
}

.restaurant-menu-widget .rm-dish-name {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #333;
}

.restaurant-menu-widget .rm-dish-price {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    background: #000;
    padding: 6px 14px;
    border-radius: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    min-width: 60px;
    text-align: center;
}

.restaurant-menu-widget .rm-dish-description {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    margin: 0;
    margin-top: 8px;
}

/* Category Footer Text */
.restaurant-menu-widget .rm-category-footer-text {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #000;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    font-weight: 500;
}

.restaurant-menu-widget .rm-category-footer-text:empty {
    display: none;
}

/* Badges */
.restaurant-menu-widget .rm-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    vertical-align: middle;
    margin-left: 5px;
}

.restaurant-menu-widget .rm-badge.vegetarian {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.restaurant-menu-widget .rm-badge.spicy {
    background: #ffe0b2;
    color: #e65100;
    border: 1px solid #ffcc02;
}

.restaurant-menu-widget .rm-badge.new {
    background: linear-gradient(135deg, #ff6b6b, #ff8787);
    color: white;
    text-transform: uppercase;
    font-size: 9px;
    padding: 4px 8px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Mobile Responsive Tabs */
@media (max-width: 768px) {
    .restaurant-menu-widget.rm-mobile-tabs .rm-tabs-nav {
        flex-direction: column;
        gap: 2px;
    }
    
    .restaurant-menu-widget.rm-mobile-tabs .rm-tab-button {
        border-radius: 8px;
        margin-bottom: 0;
        border-bottom: 1px solid #ddd;
        width: 100%;
        text-align: center;
    }
    
    .restaurant-menu-widget.rm-mobile-tabs .rm-tab-button.active {
        border: 2px solid var(--e-global-color-primary, #c9302c);
        border-bottom: 2px solid var(--e-global-color-primary, #c9302c);
    }
    
    .restaurant-menu-widget .rm-items-wrapper.columns-2,
    .restaurant-menu-widget .rm-items-wrapper.columns-3 {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .restaurant-menu-widget.layout-classic .rm-dish-item {
        flex-direction: column;
    }
    
    .restaurant-menu-widget.layout-classic .rm-dish-image {
        width: 100%;
        height: 240px;
    }
    
    .restaurant-menu-widget .rm-tab-button {
        font-size: 14px;
        padding: 10px 16px;
    }
    
    .restaurant-menu-widget .rm-dish-name {
        font-size: 18px;
    }
    
    .restaurant-menu-widget .rm-dish-price {
        font-size: 16px;
    }
    
    .restaurant-menu-widget .rm-dish-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .restaurant-menu-widget.layout-grid .rm-dish-header,
    .restaurant-menu-widget.layout-modern .rm-dish-header {
        align-items: center;
    }
}

@media (max-width: 480px) {
    .restaurant-menu-widget {
        padding: 15px 0;
    }
    
    .restaurant-menu-widget .rm-dish-item {
        padding: 15px;
    }
    
    .restaurant-menu-widget .rm-tabs-nav {
        margin-bottom: 25px;
    }
    
    .restaurant-menu-widget .rm-items-wrapper {
        gap: 15px;
    }
    
    .restaurant-menu-widget .rm-tab-button {
        font-size: 13px;
        padding: 8px 12px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .restaurant-menu-widget .rm-dish-item {
        background: #2c2c2c;
        border-color: #3c3c3c;
    }
    
    .restaurant-menu-widget .rm-dish-name {
        color: #fff;
    }
    
    .restaurant-menu-widget .rm-dish-description {
        color: #aaa;
    }
    
    .restaurant-menu-widget .rm-dish-item:hover {
        box-shadow: 0 8px 25px rgba(255,255,255,0.1);
    }
    
    .restaurant-menu-widget .rm-tab-button {
        background: #3c3c3c;
        border-color: #555;
        color: #ccc;
    }
    
    .restaurant-menu-widget .rm-tab-button:hover {
        background: #4c4c4c;
        color: #fff;
    }
    
    .restaurant-menu-widget .rm-tab-button.active {
        background: #2c2c2c;
        color: var(--e-global-color-primary, #ff6b6b);
        border-bottom-color: var(--e-global-color-primary, #ff6b6b);
    }
}

/* Print Styles */
@media print {
    .restaurant-menu-widget .rm-tabs-nav {
        display: none;
    }
    
    .restaurant-menu-widget .rm-tab-pane {
        display: block !important;
        page-break-inside: avoid;
    }
    
    .restaurant-menu-widget .rm-tab-pane:not(:first-child) {
        margin-top: 40px;
        page-break-before: always;
    }
    
    .restaurant-menu-widget .rm-tab-pane:not(:first-child):before {
        content: attr(data-tab-content);
        font-size: 24px;
        font-weight: bold;
        display: block;
        margin-bottom: 20px;
        text-transform: capitalize;
    }
    
    .restaurant-menu-widget .rm-dish-item {
        page-break-inside: avoid;
        border: 1px solid #ddd;
        box-shadow: none !important;
        margin-bottom: 15px;
    }
    
    .restaurant-menu-widget .rm-dish-image {
        display: none;
    }
    
    .restaurant-menu-widget .rm-badge.new {
        display: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .restaurant-menu-widget .rm-tab-button {
        border-width: 2px;
    }
    
    .restaurant-menu-widget .rm-tab-button.active {
        border-width: 3px;
    }
    
    .restaurant-menu-widget .rm-dish-item {
        border-width: 2px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .restaurant-menu-widget .rm-tab-button,
    .restaurant-menu-widget .rm-dish-item,
    .restaurant-menu-widget .rm-dish-image img,
    .restaurant-menu-widget .rm-badge.new {
        transition: none;
        animation: none;
    }
    
    .restaurant-menu-widget .rm-tab-pane {
        animation: none;
    }
}