/* ================================
   GLOBAL
================================= */
* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #111827;
    background-color: #f5f5f7;
    margin: 0;
    padding: 0;
    line-height: 1.45;
}

a {
    color: #2563eb;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* Standard-Container (z.B. confirm.php) */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 16px 40px;
}

/* ================================
   ALERTS / INFO
================================= */
.alert {
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 0.92rem;
    margin-bottom: 14px;
}
.alert-success {
    background: #ecfdf3;
    border: 1px solid #bbf7d0;
    color: #166534;
}
.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}
.alert-warning {
    background: #fffbeb;
    border: 1px solid #fef3c7;
    color: #92400e;
}
.info-box {
    background: #eef2ff;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.92rem;
}

/* ================================
   FRONTEND: RESERVIERUNGS-FORMULAR
   (res.kuessaburgblick.de)
================================= */

body.res-page {
    background: #f5f5f7;
    padding: 12px 10px 24px;
}

.res-wrapper {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

.res-card {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 14px 35px rgba(0,0,0,0.12);
    padding: 20px 22px 22px;
}

/* Header + Logo */
.res-header {
    text-align: center;
    margin-bottom: 14px;
}
.res-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
}
.res-logo img {
    max-height: 44px;          /* Logo-Höhe begrenzen */
    width: auto;
    display: block;
}
.res-header h1 {
    margin: 0;
    font-size: 1.35rem;
}
.res-header .subtitle {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #888;
    margin-top: 4px;
}

/* Stepper */
.stepper {
    display: flex;
    justify-content: space-between;
    margin: 10px 0 18px;
    font-size: 0.78rem;
}
.stepper-step {
    flex: 1;
    text-align: center;
    position: relative;
    color: #999;
}
.stepper-step:before {
    content: attr(data-step);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    border: 2px solid #ccc;
    margin-bottom: 4px;
    font-size: 0.75rem;
}
.stepper-step.active {
    color: #0070f3;
    font-weight: 600;
}
.stepper-step.active:before {
    border-color: #0070f3;
    background: #0070f3;
    color: #fff;
}
.stepper-separator {
    position: absolute;
    top: 10px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, transparent 0, #ddd 50%, transparent 100%);
    z-index: -1;
}

/* Form-Felder (Frontend) */
.reservation-form label {
    display: block;
    font-size: 0.82rem;
    margin-bottom: 4px;
    color: #374151;
}

.reservation-form input,
.reservation-form select,
.reservation-form textarea {
    width: 100%;
    padding: 8px 12px;
    border-radius: 999px; /* pill wie resmio */
    border: 1px solid #d4d4d8;
    font-size: 0.9rem;
    background: #ffffff;
    color: #111827;
    height: 40px;
    line-height: 1.2;
}

.reservation-form textarea {
    height: auto;
    border-radius: 10px;
}

.reservation-form input:focus,
.reservation-form select:focus,
.reservation-form textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 1px rgba(37,99,235,0.18);
}

.reservation-form .form-row {
    margin-bottom: 12px;
}

.reservation-form .form-row-inline {
    display: flex;
    gap: 10px;
    align-items: flex-end; /* Datum/Gäste optisch auf einer Höhe */
}
.reservation-form .form-row-inline .form-row {
    flex: 1;
    margin-bottom: 0;
}

/* Nummernfeld ohne Spinner (Chrome/Edge/Safari) */
.reservation-form input[type="number"]::-webkit-outer-spin-button,
.reservation-form input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
/* Firefox */
.reservation-form input[type="number"] {
    -moz-appearance: textfield;
}

/* Datum-Feld optisch wie die anderen, sauber zentriert (besonders iOS) */
.reservation-form input[type="date"] {
    -webkit-appearance: none;
    appearance: none;
    max-width: 100%;
    display: block;
    padding-top: 9px;
    padding-bottom: 9px;
    line-height: 1.2;
}

/* kleines Kalender-Icon andeuten (optional) */
.reservation-form .date-wrapper {
    position: relative;
}
.reservation-form .date-wrapper::after {
    content: "▾";
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
    color: #9ca3af;
    pointer-events: none;
}

/* Zeit-Auswahl */
.time-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 6px;
    max-height: 180px;
    overflow-y: auto;
    padding: 4px 0;
}
.time-btn {
    border-radius: 999px;
    border: 1px solid #ddd;
    padding: 6px 4px;
    font-size: 0.85rem;
    text-align: center;
    cursor: pointer;
    background: #fafafa;
    transition: all 0.15s ease;
    white-space: nowrap;
}
.time-btn:hover {
    background: #f0f5ff;
    border-color: #aac7ff;
}
.time-btn.selected {
    background: #0070f3;
    color: #fff;
    border-color: #0070f3;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* Zusammenfassung */
.summary-box {
    background: #f7f9ff;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 0.86rem;
    margin-bottom: 10px;
}
.summary-box strong {
    display: inline-block;
    min-width: 80px;
}

/* Hinweis, wenn keine Zeiten verfügbar sind */
.no-times-available {
    font-size: 0.85rem;
    color: #6b7280;
    background: #f9fafb;
    border-radius: 8px;
    padding: 8px 10px;
    border: 1px dashed #e5e7eb;
}

/* Aktionen (Frontend) */
.actions {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 4px;
}
.btn {
    background: #0070f3;
    border: none;
    color: #fff;
    padding: 9px 14px;
    font-size: 0.9rem;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    flex: 1;
    text-align: center;
}
.btn:hover {
    background: #0059c1;
}
.btn-secondary {
    background: #f0f0f0;
    color: #333;
}
.btn-secondary:hover {
    background: #e2e2e2;
}

/* Deaktivierter Button */
.btn[disabled],
.btn[disabled]:hover {
    opacity: 0.6;
    cursor: not-allowed;
    background: #9ca3af;
}

.hint-text {
    font-size: 0.75rem;
    color: #777;
    margin-top: 6px;
}

/* ================================
   ADMIN LAYOUT (resadmin.*)
================================= */

.admin-shell {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 100vh;
    background: #f3f4f6;
}

/* Sidebar */
.admin-sidebar {
    background: #ffffff;
    color: #111827;
    padding: 20px 16px;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
}

.admin-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.admin-logo {
    font-weight: 700;
    font-size: 1.05rem;
}
.admin-logo span {
    display: block;
    font-size: 0.75rem;
    color: #6b7280;
}

/* Hamburger-Button */
.admin-menu-toggle {
    display: none; /* nur mobil sichtbar */
    background: #e5e7eb;
    border-radius: 999px;
    border: none;
    width: 34px;
    height: 34px;
    font-size: 1.3rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    padding: 0;
}

/* Navigation */
.admin-nav a {
    display: block;
    padding: 9px 12px;
    border-radius: 999px;
    font-size: 0.88rem;
    color: #374151;
    margin-bottom: 6px;
}
.admin-nav a.active {
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 600;
}
.admin-nav a:hover {
    background: #f3f4ff;
}

/* Main-Bereich */
.admin-main {
    background: #f3f4f6;
    color: #111827;
    padding: 20px 18px 50px;
}
.admin-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 18px 20px;
    box-shadow: 0 18px 45px rgba(15,23,42,0.06);
}
.admin-main h1 {
    font-size: 1.45rem;
    margin: 0 0 18px;
}
.admin-main h2 {
    font-size: 1.15rem;
    margin: 14px 0 10px;
}

/* Admin-Formulare */
.admin-main label {
    font-size: 0.85rem;
    color: #374151;
}
.admin-main input,
.admin-main select,
.admin-main textarea {
    background: #ffffff;
    color: #111827;
    border: 1px solid #d4d4d8;
}
.admin-main input:focus,
.admin-main select:focus,
.admin-main textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 1px rgba(37,99,235,0.18);
}

/* Tabellen im Admin */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
}
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: 0.92rem;
}
.table th,
.table td {
    border-bottom: 1px solid #e5e7eb;
    padding: 8px 10px;
    text-align: left;
}
.table th {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
    background: #f8fafc;
}
.table tr:hover {
    background: #f9fafb;
}

/* Status-Badges */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
}
.badge.pending {
    background: #fef3c7;
    color: #92400e;
}
.badge.confirmed {
    background: #dcfce7;
    color: #166534;
}
.badge.rejected {
    background: #fee2e2;
    color: #b91c1c;
}

/* Admin-Buttons */
.btn-admin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 0.82rem;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.15s;
}
.btn-primary {
    background: #4f46e5;
    color: #eef2ff;
}
.btn-primary:hover {
    background: #4338ca;
}
.btn-danger {
    background: #ef4444;
    color: #fee2e2;
}
.btn-danger:hover {
    background: #b91c1c;
}
.btn-ghost {
    background: transparent;
    color: #374151;
}
.btn-ghost:hover {
    background: #e5e7eb;
}

/* Filter-Bar (z.B. in index.php, upcoming.php) */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 14px;
    font-size: 0.86rem;
}
.filter-bar input[type="date"],
.filter-bar input[type="time"],
.filter-bar input[type="number"],
.filter-bar select {
    max-width: 180px;
}

/* ================================
   RESPONSIVE BREAKPOINTS
================================= */

/* Tablets */
@media (max-width: 1100px) {
    .admin-shell {
        grid-template-columns: 210px 1fr;
    }
}

/* Mobile Sidebar + Layout */
@media (max-width: 900px) {
    .admin-shell {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: sticky;
        top: 0;
        z-index: 20;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
        padding: 10px 12px;
        background: #ffffff;
    }

    .admin-menu-toggle {
        display: inline-flex;
    }

    .admin-nav {
        display: none;
        margin-top: 10px;
    }

    .admin-sidebar.is-open .admin-nav {
        display: block;
    }
}

/* Phones */
@media (max-width: 600px) {
    body.res-page {
        padding: 8px 6px 20px;
    }
    .res-card {
        padding: 16px 14px 18px;
        border-radius: 12px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    }
    .reservation-form .form-row-inline {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-main {
        padding: 18px 12px 40px;
    }
    .admin-card {
        padding: 16px 14px;
    }
    .table {
        font-size: 0.84rem;
    }
}

/* Sehr kleine Phones */
@media (max-width: 360px) {
    .actions {
        flex-direction: column;
    }
    .btn {
        width: 100%;
    }
    .btn-admin {
        width: 100%;
        margin-top: 4px;
    }
}
.powered-by-outside {
    text-align: center;
    margin-top: 25px;
}

.powered-by-vertical {
    display: inline-flex;
    flex-direction: column;   /* <-- vertikal */
    align-items: center;      /* zentriert */
    text-decoration: none;
    gap: 6px;
    cursor: pointer;
    opacity: 0.8;
}

.powered-by-vertical img {
    height: 40px;             /* Logo etwas größer erlaubt */
    width: auto;
    filter: brightness(0.85);
}

.powered-by-vertical span {
    font-size: 10px;
    line-height: 1.3;
    color: #999;
}

.powered-by-vertical:hover {
    opacity: 1;
}