/* Grundlegendes Styling */
:root {
    --main-font: 'Poppins', Arial, sans-serif;
}

body {
    margin: 0;
    padding: 0;
    /* Anthrazit-Farbverlauf (radial) von der Mitte nach außen */
    background: radial-gradient(circle at center, #212221 0%, #151515 50%, #0b0b0c 100%);
    /* Für ältere Browser Fallback-Farbe */
    background-color: #262626;
    color: #ffffff; /* Textfarbe auf weiß ändern für bessere Lesbarkeit */
    min-height: 100px; /* Mindesthöhe auf 100% der Viewport-Höhe setzen */
    font-family: var(--main-font);
    margin-bottom: 60px; /* Anpassen an die Höhe des Footers */
}

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video, input, button, textarea, select {
    font-family: var(--main-font);
}

header {
    background-color: transparent;
    color: #fff;
    padding: 1em;
    text-align: center;
}

nav ul {
    list-style-type: none;
    padding: 0;
}

nav ul li {
    display: inline;
    margin-right: 10px;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
}

main {
    padding: 2em;
    /* Flex-Container für vertikale Zentrierung */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 350px); /* Berechnung der Mindesthöhe abzüglich Header und Footer */
	z-index: 1000;
}

/* Container für die Formulare und Kacheln */
#form-container {
    width: 100%;
    max-width: 1000px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

footer {
    background-color: transparent;
    color: #fff;
    text-align: center;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
	z-index: 1;
	display: contents;
}

.centered {
    text-align: center;
	margin-bottom: 65px;
}

.buttons.centered {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin: 20px 0;
}

.large-btn {
    width: 300px;
    height: 300px;
    font-size: 36px;
	font-weight: 800;
    background-size: cover;
    background-position: center;
    color: white;
	border-color: grey;
	cursor: pointer;
	border-radius: 8px;
}

.small-btn {
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
	border-radius: 0px;
    background-color: transparent; /* Dunkleres Grau für Button-Hintergrund */
    color: white;
    border: 1px solid #555;
}

.small-btn:hover {
    background-color: #555; /* Etwas helleres Grau beim Hover */
}

.navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    gap: 370px;
}

.centered-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    max-width: 600px;
    margin: 0 auto;
}

.form-row {
    display: flex;
    align-items: center;
    width: 100%;
    flex-wrap: wrap; /* Ermöglicht Zeilenumbruch für Fehlermeldungen */
}

.form-row label {
    width: 150px;
    text-align: left;
    margin-right: 10px;
}

.invisible_box{
    height: 43px;
    width: 150px;
}

.form-row input {
    flex-grow: 1;
    padding: 9px;
}

/* Fehlermeldung unter Eingabefeld positionieren */
.error-message {
    width: 100%; /* Volle Breite */
    flex-basis: 100%; /* Zwingt Zeilenumbruch */
    margin-top: 5px;
    order: 1; /* Stellt sicher, dass es nach dem Input kommt */
}

/* Desktop: Fehlermeldung mit Label-Ausrichtung */
@media (min-width: 769px) {
    .error-message {
        margin-left: 160px; /* Ausrichtung mit Eingabefeld (Label-Breite + Margin) */
    }
}

/* Mobile: Fehlermeldung zentriert unter Eingabefeld */
@media (max-width: 768px) {
    .error-message {
        margin-left: 0; /* Kein Margin - zentriert unter dem Feld */
        text-align: left;
    }
}

.child-row {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    position: relative;
}

.child-field {
    display: flex;
    flex-direction: column;
}

.child-field label {
    font-size: 12px;
}

/* Kind-Eingabefelder gleiche Höhe wie Buchungs-Eingabefeld */
.child-field input {
    padding: 9px;
    box-sizing: border-box;
    height: auto;
    min-height: inherit;
}

/* X-Icon für Kind-Eingabefelder entfernen */
.child-field-with-remove {
    position: relative;
}

.remove-child-icon {
    position: absolute;
    right: -35px;
    top: 50%;
    transform: translateY(-50%);
    width: 25px;
    height: 25px;
    background-color: #ff4444;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.2s ease;
    z-index: 10;
    user-select: none;
}

.remove-child-icon:hover {
    background-color: #cc0000;
    transform: translateY(-50%) scale(1.1);
}

/* Mobile Responsive Optimierung für Step 6 (Kind-Details) */
@media (max-width: 768px) {
    /* Child-Entries: Vertikale Anordnung auf Mobile */
    .child-row {
        display: flex;
        flex-direction: column;
        gap: 15px;
        margin-bottom: 20px;
    }
    
    /* Child-Fields: Vollbreite auf Mobile */
    .child-field {
        width: 100%;
        margin-bottom: 15px;
    }
    
    .child-field label {
        display: block;
        margin-bottom: 5px;
        font-size: 14px;
        font-weight: 500;
    }
    
    .child-field input {
        width: 100%;
        padding: 12px;
        font-size: 16px; /* Verhindert Zoom auf iOS */
        border: 1px solid #ddd;
        border-radius: 5px;
        box-sizing: border-box;
    }
    
    /* X-Icon: Oben rechts an der Child-Entry Box */
    .child-field-with-remove {
        position: relative;
        padding-right: 0; /* Kein Padding mehr, da Icon nicht neben dem Feld ist */
    }
    
    .child-entry {
        position: relative; /* Für absolutes Positionieren des X-Icons */
    }
    
    .remove-child-icon {
        position: absolute;
        right: -28px;
        top: -225px; /* Oben rechts an der Box */
        width: 25px;
        height: 25px;
        font-size: 14px;
        background-color: #ff4444;
        color: white;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        font-weight: bold;
        z-index: 10;
        user-select: none;
        transition: background-color 0.2s ease, transform 0.2s ease;
    }
    
    .remove-child-icon:hover {
        background-color: #cc0000;
        transform: scale(1.1);
    }
    
    /* Child-Entry Container */
    .child-entry {
        background-color: rgba(255, 255, 255, 0.05);
        border-radius: 8px;
        padding: 15px;
        margin-bottom: 20px;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    /* Form-Row für Buchungsdatum - Horizontal Layout für Input + Button */
    .form-row {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-bottom: 25px;
    }
    
    .form-row label {
        font-size: 14px;
        font-weight: 500;
        margin-bottom: 5px;
    }
    
    /* Container für Input + Jetzt-Button */
    .form-row {
        position: relative;
    }
    
    .form-row input {
        width: calc(100% - 70px); /* Platz für Jetzt-Button lassen */
        padding: 12px;
        font-size: 16px;
        border: 1px solid #ddd;
        border-radius: 5px;
        box-sizing: border-box;
        display: inline-block;
    }
    
    /* "Jetzt" Button bündig neben Eingabefeld für Step 5 und Step 6 */
    #now-btn,
    #child-now-btn {
        position: absolute;
        right: 0;
        top: 35px; /* Ausrichtung mit Eingabefeld */
        width: 60px;
        padding: 12px 8px;
        font-size: 16px;
        height: calc(100% - 34px); /* Gleiche Höhe wie Input */
        min-width: auto;
        box-sizing: border-box;
        border-radius: 5px;
    }
    
    /* Buttons behalten Desktop-Design bei */
    /* Keine Änderungen - verwende die globalen .small-btn Styles */
    
    /* Centered Form Anpassung */
    .centered-form {
        max-width: 100%;
        padding: 20px;
        margin: 0;
    }
    
    /* Step Titel */
    #step6 h2 {
        font-size: 24px;
        margin-bottom: 25px;
        text-align: center;
    }
    
    /* Time-Options: Mobile Positionierung für Step 5 und Step 6 */
    #time-options,
    #child-time-options {
        position: static !important; /* Überschreibt JavaScript-Positionierung */
        left: auto !important;
        top: auto !important;
        margin-top: -25px;
        width: 90%;
        right: 0;
        float: right;
        clear: both;
    }
    
    .time-option-btn {
        display: block;
        width: 100%;
        padding: 5px;
        margin: 12px 0;
        background-color: #555;
        color: white;
        border: none;
        border-radius: 2px;
        cursor: pointer;
        font-size: 18px;
    }

    .form-row {
        overflow: visible; /* Stelle sicher, dass time-options sichtbar bleiben */
    }
    
    /* Confirmation-Seite Mobile Optimierung */
    #confirmation {
        padding: 20px;
    }
    
    .confirmation.centered {
        margin-bottom: 30px; /* Reduzierter Abstand für Mobile */
    }
    
    .check-icon {
        width: 150px !important; /* Kleineres Icon für Mobile */
        height: 150px !important;
        margin: 0 auto 20px auto; /* Zentriert mit Abstand nach unten */
    }
    
    /* Bestätigungstext Mobile */
    #confirmation p {
        font-size: 28px !important; /* Kleinere Schriftgröße für Mobile */
        font-weight: 800;
        color: #00CC73;
        margin: 20px 10px !important; /* Seitliche Abstände */
        line-height: 1.2;
        text-align: center;
    }
}

/* Benutzer-Validierung Fehlermeldungen */
.validation-error {
    background-color: #ffe6e6;
    border: 1px solid #ff4444;
    color: #cc0000;
    padding: 12px 15px;
    border-radius: 5px;
    margin: 15px 0;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    display: none; /* Initial versteckt */
}

.validation-error::before {
    content: "⚠️ ";
    margin-right: 8px;
}

/* Deaktivierter Next-Button Styles */
.next-btn:disabled {
    background-color: #cccccc !important;
    color: #666666 !important;
    cursor: not-allowed !important;
    opacity: 0.5 !important;
    border-color: #cccccc !important;
}

.next-btn:disabled:hover {
    background-color: #cccccc !important;
    transform: none !important;
    box-shadow: none !important;
}

.time-options {
    position: absolute;
    background: #444; /* Dunkleres Grau für die Zeitleiste */
    border: 1px solid #555;
    padding: 10px;
    z-index: 10;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.time-option-btn {
    display: block;
    width: 100%;
    padding: 5px;
    margin: 5px 0;
    background-color: #555;
    color: white;
    border: none;
    border-radius: 2px;
    cursor: pointer;
}

.time-option-btn:hover {
    background-color: #666;
}

.check-icon {
    width: 250px;
    height: 250px;
}

#add-child {
    margin: 10px 0;
}

.checkbox-row {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 15px;
}

.checkbox-row label {
    display: flex;
    align-items: center;
    margin-left: 150px;
    max-width: 400px; /* Passe dies an die Breite deiner Eingabefelder an */
    white-space: normal;
}

.checkbox-booking{
	padding-left: 0;
	align-items: center;
	display: flex;
	margin-bottom: 15px;
	align-self: flex-start !important;
	width: 100% !important;
	justify-content: flex-start !important;
}

/* FORCE linksbündige Checkboxen */
.checkbox-container-left {
	align-self: flex-start !important;
	width: 100% !important;
	text-align: left !important;
	justify-content: flex-start !important;
	display: flex !important;
}

.checkbox-left {
	justify-content: flex-start !important;
	align-self: flex-start !important;
	width: 100% !important;
	text-align: left !important;
	margin-left: 0 !important;
	padding-left: 0 !important;
}

/* Desktop-Ansicht: Checkboxen bündig mit Eingabefeldern */
@media only screen and (min-width: 769px) {
	.checkbox-container-left {
		margin-left: 160px !important;
	}
}

/* Span in Checkbox-Label korrekt formatieren */
.checkbox-booking span {
	display: inline !important;
	margin: 0 !important;
	padding: 0 !important;
	font-size: inherit !important;
	font-weight: inherit !important;
	line-height: inherit !important;
	color: inherit !important;
}

/* Links in Checkboxen korrekt formatieren */
.checkbox-booking a {
	color: #87CEEB !important;
	text-decoration: underline !important;
	font-size: inherit !important;
	font-weight: inherit !important;
	line-height: inherit !important;
	display: inline !important;
	margin: 0 !important;
	padding: 0 !important;
}

.checkbox-booking a:hover {
	color: #ADD8E6 !important;
	text-decoration: underline !important;
}

.checkbox-booking-box{
	margin-right: 10px;
}

#membercard-number{
    padding: 5px;
    width: 96%;
    text-align: center;
    font-size: 25px;
}

/* Anpassungen für die benutzerdefinierten Datumsfelder */
.date-mask {
    flex-grow: 1;
    padding: 5px;
    background-color: #fff;
    color: #333;
    border: 1px solid #ccc;
}

/* Mobile Ansicht Anpassungen */
@media only screen and (max-width: 768px) {
    html, body {
        overflow-x: hidden;
        width: 100%;
        position: relative;
    }
    
    .buttons.centered {
        flex-direction: column !important;
        align-items: center;
        gap: 20px;
        width: 100%;
    }
    
    .large-btn {
        width: 90% !important;
        max-width: 300px;
        margin-bottom: 15px;
    }
    

    
    .form-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .form-row label {
        width: 100%;
        text-align: left;
        margin-bottom: 5px;
    }
    
    #child-booking-date {
        width: 75%;
    }

    #booking-date{
        width: 75%;
    }

    .form-row input, .date-mask {
        width: 100%;
    }
    
    .checkbox-booking {
        padding-left: 0;
    }
    
    /* Eingabefelder mobil: gleicher Abstand links und rechts */
    .form-row input, 
    .date-mask {
        padding: 9px 15px !important;
        box-sizing: border-box !important;
    }
    
    .navigation {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    
    .navigation button {
        width: 100%;
    }
}

/* Noch kleinere Bildschirme - ALLE Buttons EXAKT gleich */
@media only screen and (max-width: 480px) {
    .activity-btn.large-btn,
    .age-btn.large-btn,
    .membercard-btn.large-btn {
        width: 200px !important;
        height: 200px !important;
        font-size: 24px !important;
        font-weight: 800 !important;
        margin-bottom: 15px !important;
        border-radius: 8px !important;
        background-size: cover !important;
        background-position: center !important;
        border-color: grey !important;
        color: white !important;
        cursor: pointer !important;
        text-align: center !important;
        padding: 10px !important;
        box-sizing: border-box !important;
        display: inline-block !important;
    }
    
    /* Text in Step 2 Buttons korrekt darstellen */
    .age-btn.large-btn p {
        margin: 5px 0 0 0 !important;
        padding: 0 !important;
        font-size: 12px !important;
        font-weight: 100 !important;
        color: grey !important;
        line-height: 1.1 !important;
    }
}