* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: #f0f2f5;
}

#container {
    width: 100vw;
    height: auto;
    text-align: center;
    padding-top: 10px;
    padding-bottom: 40px;
}

@font-face {
    font-family: 'Nexa-book'; /* Tutaj wpisujesz dowolną nazwę, jakiej będziesz używać w kodzie */
    src: url('../res/Nexa-Book.woff') format('woff');
    font-weight: normal; /* Grubość czcionki (np. normal, bold, 400, 700) */
    font-style: normal;  /* Styl (normal lub italic) */
    font-display: swap;  /* Zapobiega niewidzialnemu tekstowi podczas ładowania strony */
}

@font-face {
    font-family: 'Intro-regular'; /* Tutaj wpisujesz dowolną nazwę, jakiej będziesz używać w kodzie */
    src: url('../res/Intro-Regular-Caps.woff') format('woff');
    font-weight: normal; /* Grubość czcionki (np. normal, bold, 400, 700) */
    font-style: normal;  /* Styl (normal lub italic) */
    font-display: swap;  /* Zapobiega niewidzialnemu tekstowi podczas ładowania strony */
}

/* STRONA 1: Arkusz wewnętrzny A4 w poziomie */
#menu {
    width: 297mm;
    height: 210mm;
    background-image: url(../res/skrocone-srodek.jpg);
    background-size: cover;
    background-position: center;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 30px; /* Odstęp między stronami widoczny na monitorze */
    box-shadow: 0 0 20px rgba(0,0,0,0.15);
    
    /* Wymuszenie łamania strony bezpośrednio po tym bloku w trakcie druku */
    break-after: page;
    page-break-after: always;
}

/* STRONA 2: Pusty arkusz okładki A4 w poziomie */
#menu-cover {
    width: 297mm;
    height: 210mm;
    /* TUTAJ WPISZ ŚCIEŻKĘ DO PLIKU GRAFIKI OKŁADKI: */
    background-image: url(../res/skrocone-okladka.jpg); 
    background-size: cover;
    background-position: center;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 0 20px rgba(0,0,0,0.15);
}

#menu-content {
    position: relative;
    top: 20mm;
    left: 20mm;       
    width: 257mm;      
    height: 170mm;
    background-color: rgba(127, 255, 212, 0.2); 
    padding: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 40px;
}

/* Główne kolumny całego arkusza menu */
.main-menu-column {
    flex: 1;
    height: 100%;
    min-height: 100px;
    border: 1px dashed transparent;
    transition: border-color 0.2s;
    text-align: center; 
}

#menu-content .main-menu-column:hover {
    border-color: rgba(91, 94, 63, 0.2);
    border-radius: 4px;
}

/* ==========================================================================
   2. BLOKI KATEGORII I DWUJĘZYCZNE NAGŁÓWKI
   ========================================================================== */
.menu-cat-block {
    text-align: center;
    margin-bottom: 25px;
    position: relative;
    width: 100%;
}

.menu-print-header {
    font-family: 'Intro-regular', sans-serif;
    text-transform: uppercase;
    margin: 0 0 15px 0;
    padding-bottom: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.menu-print-header .header-pl {
    font-size: 22px;
    font-weight: 700;
    color: #5b5e3f;
}

.menu-print-header .header-eng {
    font-size: 16px;
    font-weight: 400;
    color: #5b5e3f;
}

.header-separator {
    font-weight: normal;
    color: #5b5e3f;
}

.category-dishes-container {
    width: 100%;
}

/* ==========================================================================
   3. POZYCJE MENU (DANIA WYŚRODKOWANE, CENA JAKO ODDZIELNY AKAPIT POD SPODEM)
   ========================================================================== */
.menu-print-dish {
    margin-top: 10px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column; 
    justify-content: center;
    align-items: center;   
    text-align: center;    
    width: 100%;
    position: relative;
}

.dish-names-wrapper {
    width: 100%;
}

.dish-pl {
    font-family: 'Intro-regular', sans-serif;
    font-weight: 700;
    font-size: 13pt;
    color: #5b5e3f;
    margin: 2px 0;
    text-transform: uppercase;
}

.dish-eng {
    font-family: 'Nexa-book', sans-serif;
    font-weight: 500;
    font-size: 11pt;
    color: #5b5e3f;
    margin: 2px 0;
    text-transform: uppercase;
}

.dish-price-wrapper {
    font-family: 'Nexa-book', sans-serif;
    font-weight: 800;
    font-size: 10pt;
    color: #5b5e3f;
    text-transform: uppercase;
    margin: 4px 0 0 0;
    display: inline-block;
    min-width: 30px;
    min-height: 14px;
}

/* ==========================================================================
   4. PANEL I INTERFEJS EDYCJI (NIE DRUKUJĄ SIĘ)
   ========================================================================== */
#admin-panel {
    background: #2c3e50;
    color: #fff;
    padding: 15px;
    text-align: left;
    font-family: Arial, sans-serif;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    margin-bottom: 20px;
}

#admin-panel h2 { margin: 0 0 10px 0; font-size: 18px; color: #ecf0f1; }
#admin-panel select, #admin-panel button { padding: 8px 12px; margin-right: 10px; border-radius: 4px; border: none; }
#admin-panel button { background: #27ae60; color: white; font-weight: bold; cursor: pointer; }
#admin-panel button:hover { background: #219653; }
.panel-section { display: inline-block; margin-right: 30px; vertical-align: top; }

.del-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 2px 6px;
    font-size: 11px;
    border-radius: 3px;
    cursor: pointer;
}
.del-btn:hover { background: #c0392b; }

.dish-del-btn {
    position: absolute;
    right: 0;
    top: 2px;
}

.header-del-btn {
    position: absolute;
    right: 0;
    top: -5px;
    z-index: 10;
    padding: 4px 8px;
    border-radius: 4px;
}

.header-move-btn {
    position: absolute;
    left: 0;
    top: -5px;
    z-index: 10;
    padding: 4px 8px;
    border-radius: 4px;
}

.move-btn {
    background: #34495e;
    color: white;
    border: none;
    font-size: 11px;
    cursor: pointer;
    transition: background 0.2s;
}
.move-btn:hover { background: #2c3e50; }

[contenteditable="true"] {
    cursor: text;
    outline: none; 
    transition: background-color 0.2s ease;
}

[contenteditable="true"]:hover {
    background-color: rgba(241, 196, 15, 0.1); 
    border-radius: 3px;
}

[contenteditable="true"]:focus {
    background-color: rgba(241, 196, 15, 0.2);
    box-shadow: 0 0 4px rgba(241, 196, 15, 0.5);
}

/* ==========================================================================
   5. REGÓŁY WYDRUKU I GENEROWANIA PDF (USTAWIENIA STRON)
   ========================================================================== */
@media print {
    /* Wymuszenie orientacji poziomej oraz zerowych marginesów systemowych drukarki */
    @page {
        size: A4 landscape;
        margin: 0;
    }

    .no-print, .del-btn, .header-del-btn, .move-btn, .header-move-btn, .dish-del-btn, #admin-panel {
        display: none !important;
    }
    body {
        background-color: #fff !important;
    }
    #menu-content {
        background-color: transparent !important; 
    }
    #container {
        width: 100% !important;
        height: auto !important;
        padding-top: 0;
        padding-bottom: 0;
    }
    #menu {
        margin-bottom: 0 !important;
        box-shadow: none !important;
    }
    #menu-cover {
        box-shadow: none !important;
    }
    .main-menu-column { 
        border: none !important; 
    }
    [contenteditable="true"]:hover,
    [contenteditable="true"]:focus {
        background-color: transparent !important;
        box-shadow: none !important;
    }
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}