/* Font faces */
@font-face {
    font-family: 'Trade Gothic';
    src: url('../font/TradeGothicLTPro.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Trade Gothic';
    src: url('../font/TradeGothicCECon-BolTwe.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
}

/* Reset a základní styly */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Teplá zemitá paleta - elegantní a příjemná pro restauraci */
    --primary-color: #8b6f47;
    --primary-hover: #6d5638;
    --primary-light: #a68a64;
    --secondary-color: #5a6c57;
    --success-color: #6b8e4e;
    --error-color: #c85a54;
    --warning-color: #d4a574;
    --bg-color: #f5f3f0;
    --card-bg: #ffffff;
    --header-gradient-1: #8b6f47;
    --header-gradient-2: #6d5638;
    --text-primary: #2d2d2d;
    --text-secondary: #6b6b6b;
    --border-color: #e0ddd8;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.06);
}

body {
    font-family: 'Trade Gothic', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Tlačítka */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #475569;
    transform: translateY(-1px);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-danger {
    background-color: var(--error-color);
    color: white;
    padding: 8px 12px;
    font-size: 16px;
}

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Formuláře */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group input:disabled,
.form-group textarea:disabled {
    background-color: #f5f3f0;
    cursor: not-allowed;
}

textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

/* Alerty */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--error-color);
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border-left: 4px solid var(--success-color);
}

.alert-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    max-width: 400px;
}

.alert-container .alert {
    margin-bottom: 10px;
    box-shadow: var(--shadow-lg);
}

/* ========== PŘIHLAŠOVACÍ STRÁNKA ========== */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--header-gradient-1) 0%, var(--header-gradient-2) 100%);
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-box {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
}

.login-box h1 {
    text-align: center;
    margin-bottom: 10px;
    font-size: 28px;
    color: var(--text-primary);
}

.login-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-size: 14px;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
}

.login-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* ========== ADMINISTRACE ========== */
.admin-page {
    background-color: var(--bg-color);
}

.admin-header {
    background: linear-gradient(135deg, var(--header-gradient-1) 0%, var(--header-gradient-2) 100%);
    color: white;
    padding: 20px 0;
    box-shadow: var(--shadow);
}

.admin-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.admin-header h1 {
    font-size: 24px;
    margin: 0;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.header-actions .btn {
    font-size: 13px;
    padding: 8px 16px;
}

.admin-content {
    padding: 30px 20px;
}

/* Výběr týdne */
.week-selector {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    justify-content: center;
}

.week-selector .btn {
    min-width: 180px;
}

/* Loading indikátor */
.loading-indicator {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Menu editor */
.menu-editor {
    display: grid;
    gap: 25px;
}

.day-card {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.2s;
}

.day-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.day-card-disabled {
    opacity: 0.6;
}

.day-header {
    background: linear-gradient(135deg, var(--header-gradient-1) 0%, var(--header-gradient-2) 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.day-header h3 {
    font-size: 18px;
    margin: 0;
}

.day-date {
    font-size: 14px;
    opacity: 0.9;
}

.day-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.day-body {
    padding: 20px;
}

/* Skip container */
.skip-container {
    margin-bottom: 20px;
    padding: 15px;
    background: #f5f3f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.skip-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.skip-container label {
    cursor: pointer;
    font-weight: 600;
    margin: 0;
}

.skip-message-container {
    margin-bottom: 20px;
}

.skip-message-container label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
}

.skip-message-input {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s;
}

.skip-message-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.skip-message-input:disabled {
    background-color: #f5f3f0;
    cursor: not-allowed;
}

/* Items container */
.items-container {
    margin-bottom: 20px;
}

/* Special offer container */
.special-offer-container {
    margin-bottom: 20px;
    padding: 15px;
    background: #f5f3f0;
    border-radius: 8px;
}

.special-offer-container label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
}

.special-offer-container input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.special-offer-container input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.special-offer-container input:disabled {
    background-color: #f5f3f0;
    cursor: not-allowed;
}

.menu-item-form {
    margin-bottom: 15px;
    padding: 15px;
    background: #faf9f7;
    border-radius: 8px;
    border: 2px solid var(--border-color);
}

.menu-type-header {
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-color);
}

.menu-type-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
}

.menu-item-row {
    display: grid;
    grid-template-columns: 120px 1fr 120px auto;
    gap: 15px;
    align-items: end;
}

.form-group-flex {
    flex: 1;
}

.menu-item-form .form-group {
    margin-bottom: 0;
}

.btn-add-item {
    margin-bottom: 15px;
    width: 100%;
}

.btn-save-day {
    width: 100%;
}

/* ========== VEŘEJNÁ STRÁNKA ========== */
.public-page {
    background: url('../img/bg.jpg') center center / cover no-repeat fixed;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}

.public-container {
    position: relative;
    z-index: 1;
    width: 100%;
    background: transparent;
    border-radius: 20px;
    overflow: hidden;
}

.public-header {
    background: transparent;
    color: white;
    padding: 0 30px 0;
    text-align: center;
}

.restaurant-logo {
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
}

.restaurant-logo img {
    max-width: none;
    width: auto;
    height: auto;
    border-radius: 8px;
    zoom: .7;
}

.public-header h1 {
    font-size: 36px;
    margin-bottom: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #000000;
}

.date-info {
    font-size: 16px;
    opacity: 0.9;
}

.menu-display {
    max-width: 780px;
    margin: 0 auto;
}

/* Menu items */
.menu-items {
    display: flex;
    flex-direction: column;
    gap: 35px;
}

/* New centered display format */
.menu-item-display {
    padding: 0 20px 0;
    background: transparent;
    border-radius: 12px;
    border: none;
    text-align: center;
    transition: transform 0.2s;
    width: 700px;
    margin: 0 auto;
}

.menu-item-display:hover {
    transform: translateY(-2px);
}

.menu-type-title {
    font-size: 32px;
    font-weight: 700;
    color: #d4a574;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.menu-weight {
    color: #000000;
    font-size: 30px;
    font-weight: 700;
    margin-bottom: 10px;
}

.menu-name {
    font-size: 34px;
    font-weight: 700;
    color: #000000;
    margin-bottom: 12px;
    line-height: 1.3;
}

.menu-price {
    font-size: 36px;
    font-weight: 700;
    color: #000000;
}

/* Old format - kept for backwards compatibility */
.menu-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #faf9f7;
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
    transition: transform 0.2s, box-shadow 0.2s;
}

.menu-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow);
}

.item-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
}

.item-weight {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 60px;
    text-align: left;
}

.item-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
}

.item-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    white-space: nowrap;
    flex-shrink: 0;
}

/* Special offer display */
.special-offer-display {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    padding: 0 25px;
    background: transparent;
    border-radius: 12px;
    border: none;
    width: 670px;
    margin: 0 auto;
}

.special-offer-image {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.special-offer-image img {
    width: auto;
    height: auto;
    max-width: 100%;
    border-radius: 8px;
}

.special-offer-price-display {
    font-size: 36px;
    font-weight: 700;
    color: #000000;
    text-align: right;
    flex: 1;
    padding-left: 20px;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding-bottom: 33px;
}

.menu-info {
    text-align: center;
    font-size: 28px;
    color: #d4a574;
    font-style: normal;
    font-weight: 700;
    margin: 0;
    padding-bottom: 20px;
}

/* Deprecated - no longer used */
.item-details {
    flex: 1;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 15px;
    margin-bottom: 8px;
}

/* Skip message */
.skip-message,
.no-menu {
    text-align: center;
    padding: 40px 20px;
}

.skip-icon,
.no-menu-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.skip-message h2,
.no-menu h2 {
    font-size: 24px;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.skip-text,
.no-menu p {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Footer */
.public-footer {
    background: #faf9f7;
    padding: 20px 30px;
    text-align: center;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.public-footer p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.admin-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.admin-link:hover {
    text-decoration: underline;
}

/* ========== RESPONZIVNÍ DESIGN ========== */
@media (max-width: 768px) {
    .admin-header .container {
        flex-direction: column;
        text-align: center;
    }

    .header-actions {
        width: 100%;
        flex-direction: column;
    }

    .header-actions .btn {
        width: 100%;
    }

    .week-selector {
        flex-direction: column;
    }

    .week-selector .btn {
        width: 100%;
    }

    .menu-item-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .menu-item-row .btn-danger {
        width: 100%;
    }

    .restaurant-logo img {
        width: auto;
        max-width: 100%;
    }

    .public-header h1 {
        font-size: 36px;
    }

    .menu-type-title {
        font-size: 24px;
    }

    .menu-weight {
        font-size: 30px;
    }

    .menu-name {
        font-size: 30px;
    }

    .menu-price {
        font-size: 24px;
    }

    .special-offer-display {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .special-offer-price-display {
        padding-left: 0;
        padding-top: 15px;
        font-size: 36px;
    }

    .menu-info {
        font-size: 20px;
    }

    .menu-item {
        flex-wrap: wrap;
        gap: 10px;
    }

    .item-number {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }

    .item-weight {
        font-size: 13px;
    }

    .item-name {
        font-size: 16px;
        flex-basis: 100%;
        order: 3;
    }

    .item-price {
        font-size: 18px;
        order: 2;
        margin-left: auto;
    }

    .public-footer {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .login-box {
        padding: 30px 20px;
    }

    .day-header {
        flex-direction: column;
        gap: 10px;
        align-items: start;
    }
}
