/* Main container */
.bringmal-reservation-form {
    max-width: 800px;
    margin: 2rem auto;
    padding: 1rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.bringmal-message.bringmal-error.bringmal-error-visible + div + .form-step.active .time-slots, .bringmal-message.bringmal-error.bringmal-error-visible + div + .form-step.active .next-step {
    display: none;
}

/* Gemeinsame Basis-Styles für Meldungen */
.bringmal-message-container {
    max-width: 467px;
    width: 100%;
    margin: 10px auto;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Fehlermeldungen Styling */
#bringmal-message-box.bringmal-error {
    background-color: #ffebee; /* Heller roter Hintergrund */
    color: #c62828; /* Dunkelrote Textfarbe */
    /* border-left: 4px solid #c62828; */
    border-radius: 4px;
    font-size: 16px;
    line-height: 1.4;
    padding: 10px 15px;
    width: 100%;
    box-sizing: border-box;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transform: translateY(-10px);
    will-change: transform, opacity, max-height;
    transition: 
        opacity 0.4s ease-out, 
        max-height 0.4s ease-out, 
        padding 0.4s ease-out,
        transform 0.4s ease-out;
}

#bringmal-message-box.bringmal-error.bringmal-error-visible {
    opacity: 1;
    max-height: 200px;
    transform: translateY(0);
}

/* Styling für deaktivierte Buttons */
.next-step.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #cccccc;
    border-color: #aaaaaa;
    color: #666666;
    pointer-events: none;
}

#bringmal-message-box.bringmal-success {
    text-align: center;
    padding: 1em 1em 2em;
    max-width: 467px;
    width: 100%;
    margin: auto;
    box-shadow: -2px -2px 10px #f0f0f0;
    border-radius: 18px;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transform: translateY(-20px);
    transition: opacity 0.3s ease-out, max-height 0.5s ease-out, transform 0.3s ease-out;
    will-change: opacity, max-height, transform;
}

#bringmal-message-box.bringmal-success.bringmal-success-visible {
    opacity: 1;
    max-height: 800px;
    transform: translateY(0);
}

.bringmal-success-message {
    width: 100%;
    padding: 2em 0;
}

/* Tageshinweise Styling */
.bringmal-day-notices {
    margin: 10px auto; /* Zentrieren mit auto margin */
    padding: 0;
    max-width: 467px;
    width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center; /* Zentriert die Kinder horizontal */
}

/* Brevo Newsletter Checkbox Styling - Modern & Mobile-friendly */
.brevo-newsletter-opt-in {
    margin-top: 20px;
    margin-bottom: 10px;
}

.brevo-newsletter-opt-in .checkbox-container {
    display: flex;
    align-items: center;
    position: relative;
    padding: 4px 0;
}

/* Verstecke die ursprüngliche Checkbox */
.brevo-newsletter-opt-in input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* Erstelle einen benutzerdefinierten Container für die Checkbox */
.brevo-newsletter-opt-in .checkbox-container label {
    position: relative;
    padding-left: 40px; /* Mehr Platz für die Checkbox */
    cursor: pointer;
    font-size: 15px;
    line-height: 1.5;
    color: #444;
    user-select: none;
    display: inline-block;
    margin-bottom: 0;
}

/* Erstelle die benutzerdefinierte Checkbox */
.brevo-newsletter-opt-in .checkbox-container label:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 24px; /* Größere Checkbox */
    height: 24px; /* Größere Checkbox */
    border: 2px solid #2e7d32; /* Grüner Rahmen */
    border-radius: 4px;
    background-color: #fff;
    transition: all 0.2s ease;
}

/* Erstelle das Häkchen */
.brevo-newsletter-opt-in .checkbox-container label:after {
    content: '';
    position: absolute;
    display: none;
    left: 9px;
    top: 5px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Zeige das Häkchen an, wenn die Checkbox aktiviert ist */
.brevo-newsletter-opt-in input[type="checkbox"]:checked + label:before {
    background-color: #2e7d32; /* Grüner Hintergrund wenn aktiviert */
    border-color: #2e7d32;
}

.brevo-newsletter-opt-in input[type="checkbox"]:checked + label:after {
    display: block;
}

/* Hover-Effekt für bessere UX */
.brevo-newsletter-opt-in .checkbox-container:hover label:before {
    border-color: #1b5e20; /* Dunkleres Grün beim Hover */
}

/* Fokus-Stil für Barrierefreiheit */
.brevo-newsletter-opt-in input[type="checkbox"]:focus + label:before {
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.25); /* Leichter Schatten für Fokus */
}

/* Mobile-spezifische Anpassungen */
@media (max-width: 767px) {
    .brevo-newsletter-opt-in .checkbox-container label {
        padding-left: 36px;
    }
    
    .brevo-newsletter-opt-in .checkbox-container label:before {
        width: 26px; /* Noch größer auf Mobilgeräten */
        height: 26px; /* Noch größer auf Mobilgeräten */
    }
    
    .brevo-newsletter-opt-in .checkbox-container label:after {
        left: 10px;
        top: 6px;
        width: 6px;
        height: 12px;
    }
}

.bringmal-day-notice {
    background-color: #e8f5e9;
    color: #2e7d32;
    /* border-left: 4px solid #2e7d32; */
    padding: 0; /* Start mit 0 Padding für bessere Animation */
    margin-bottom: 0; /* Start mit 0 Margin für bessere Animation */
    border-radius: 4px;
    font-size: 16px;
    line-height: 1.4;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    width: 100%; /* Volle Breite des Containers */
    transform: translateY(-10px); /* Leicht nach oben verschoben für Animation */
    will-change: transform, opacity, max-height, padding, margin; /* Verbessert Performance */
    transition: 
        opacity 0.4s ease-out, 
        max-height 0.4s ease-out, 
        margin 0.4s ease-out, 
        padding 0.4s ease-out,
        transform 0.4s ease-out;
}

.bringmal-day-notice.visible {
    opacity: 1;
    max-height: 200px; /* Ausreichend groß für den Inhalt */
    margin-bottom: 8px;
    padding: 10px 15px;
    transform: translateY(0); /* Zurück zur normalen Position */
}



#reservation-date {
    width: 100%; 
    max-width: 100%;
    box-sizing: border-box; 
    -webkit-appearance: none; 
    appearance: none; 
}

#reservation-date {
    display: block;
    width: 100%;
    min-height:50px;
}

#reservation-persons {
    -webkit-appearance: none!important;
    margin: 0!important;
    -moz-appearance: textfield!important;
}


span.success-ajax-content {
    text-align: center;
    max-width: 600px;
    display: inline-block;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

span.success-ajax-headline {
    display: block;
    text-align: center;
    font-weight: 600;
}

.bringmal-reservation-form h3 {
    text-align: center;
}

/* Progress bar */
.reservation-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.reservation-progress::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: #e0e0e0;
    z-index: 1;
}

.progress-step {
    position: relative;
    z-index: 2;
    background: white;
    padding: 0 1rem;
    text-align: center;
}

.progress-step .step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

.progress-step .step-label {
    font-size: 0.875rem;
    color: #666;
    transition: all 0.3s ease;
}

.progress-step.active .step-number {
    background: var(--wp--preset--color--primary);
    color: white;
}

.progress-step.active .step-label {
    color: var(--wp--preset--color--primary);
    font-weight: bold;
}

/* Form steps */
.form-step {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.form-step.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Persons selector */
.persons-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.persons-btn {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50%;
    border: 2px solid var(--wp--preset--color--primary);
    background: white;
    color: var(--wp--preset--color--primary);
    font-size: 1.5rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.persons-btn:hover:not(:disabled) {
    background: var(--wp--preset--color--primary);
    color: white;
}

.persons-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #ccc;
    color: #ccc;
}

input[name="persons"] {
    width: 100%;
    padding: 0;
    max-width: 43px;
    text-align: center;
    border: none;
    background: transparent;
    margin-left: 10px;
    font-weight: 500;
    font-size: 27px;
    margin-left: 0;
}

.persons-selector .persons-btn {
    touch-action: manipulation;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

.persons-selector input[type="number"] {
    touch-action: none;
    -webkit-touch-callout: none;
}

.bringmal-reservation-form p.agb-note {
    font-size: 10px;
}

/* Date and Time selector */
.date-time-selector {
    display: grid;
    gap: 2rem;
    margin: 2rem 0;
}

.time-slots-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.time-slot {
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
}

input#reservation-date,
#reservation-time {
    border-radius: 4px;
    width: 100%;
    max-width: 467px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
}

.time-slot:hover:not(.disabled) {
    border-color: var(--wp--preset--color--primary);
}

.time-slot.selected {
    background: var(--wp--preset--color--primary);
    border-color: var(--wp--preset--color--primary);
    color: white;
}

.time-slot.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f5f5;
}

/* Form fields */
.form-field {
    margin-bottom: 1.5rem;
    position: relative;
    font-size: 18px;
}

.form-field label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-field input[type="text"],
.form-field input[type="tel"],
.form-field input[type="date"],
.form-field textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

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

.form-field .error-message {
    display: none;
    color: #d32f2f;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-field.error input,
.form-field.error textarea {
    border-color: #d32f2f;
}

.form-field.error .error-message {
    display: block;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Radio buttons */
.radio-group {
    display: flex;
    gap: 2rem;
    margin-bottom: 1rem;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

/* Modern Radio Buttons Styling */
.allergies-group {
    margin: 20px 0;
    margin-bottom: 4em !important;
}

.allergies-group .radio-container {
    display: flex;
    gap: 20px;
    margin: 15px 0;
    justify-content: center;
    flex-wrap: wrap;
}

.bringmal-message.bringmal-success + div {
    display: none !important;
}

.allergies-group .radio-option {
    position: relative;
    min-width: auto;
}

.allergies-group .radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.allergies-group .radio-option label {
    border: 2px solid #ddd;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-align: center;
    font-weight: 500;
    border-radius: 50%;
    width: 80px!important;
    height: 80px!important;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 80px;
    max-height: 80px;
}


.date-picker label,
.time-slots label {
    display: block;
    max-width: 431px;
    margin-left: auto;
    margin-right: auto;
    font-size: 18px;
}

.allergies-group .radio-option input[type="radio"]:checked + label {
    background-color: #4CAF50;
    color: white;
    border-color: #4CAF50;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.allergies-group .radio-option label:hover {
    border-color: #4CAF50;
}

.allergies-group .allergies-notes {
    margin-top: 15px;
    width: 100%;
}

.allergies-group .allergies-notes textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    resize: vertical;
    min-height: 100px;
    transition: border-color 0.3s ease;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    display: block;
}



.allergies-group .allergies-notes textarea:focus {
    outline: none;
    border-color: #4CAF50;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .allergies-group .radio-container {
        flex-direction: column;
        gap: 10px;
    }

    .allergies-group .radio-option {
        width: 100%;
    }

    .allergies-group .radio-option label {
        width: 100%;
        padding: 15px 20px;
    }
}

/* Buttons */
.step-buttons {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    gap: 20px
}

button.next-step,
button.prev-step,
button.submit-reservation {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

button.next-step,
button.submit-reservation {
    background: var(--wp--preset--color--primary);
    color: white;
}

button.prev-step {
    background: #f5f5f5;
    color: #666;
}

button.next-step:hover,
button.submit-reservation:hover {
    background: var(--wp--preset--color--primary);
    filter: brightness(80%);

}

button.prev-step:hover {
    background: #e0e0e0;
}

.date-time-selector:not(.date-selected) .time-slots,
.date-time-selector:not(.date-selected) + .step-buttons .next-step {
    display: none;
}


/* Messages */
.reservation-messages {
    margin-top: 2rem;
}

.success-message,
.error-message {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    display: none;
}

.success-message {
    background: #E8F5E9;
    color: #1B5E20;
}

/* Reservierungszusammenfassung */
.reservation-summary {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: #f9f9f9;
    border-left: 4px solid #4CAF50;
    border-radius: 4px;
}

.reservation-summary h4 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.reservation-summary p {
    margin: 0;
    font-size: 1.1em;
    color: #555;
}

.error-message {
    background: #FFEBEE;
    color: #B71C1C;
}

/* Error messages */
.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

.error-message.visible {
    display: block;
}

/* Form validation styles */
input:invalid,
select:invalid {
    border: 2px solid #e0e0e0;
    border-radius: 4px;
}

input:invalid:focus,
select:invalid:focus {
    /* border-color: #dc3545; */
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

input[aria-invalid="true"],
select[aria-invalid="true"] {
    border-color: #dc3545;
}

input[aria-invalid="false"]:valid,
select[aria-invalid="false"]:valid {
    border-color: #28a745;
}

/* Time slots select styling */
#reservation-time {
    width: 100%;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23343a40' d='M6 8.825L1.175 4 2.238 2.938 6 6.7l3.763-3.763L10.825 4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 12px;
}

#reservation-time:disabled {
    background-color: #e9ecef;
    cursor: not-allowed;
}

/* Responsive design */
@media (max-width: 768px) {


    .form-row {
        grid-template-columns: 1fr;
    }

    .step-label {
        display: none;
    }

    .time-slots-list {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .step-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .step-buttons button {
        width: 100%;
    }

    .allergies-group .radio-container {
        flex-direction: inherit;
        gap: 8px;
        flex-wrap: unset;
    }

    .allergies-group .radio-container > div {
        display: flex;
        justify-content: center;
        max-width: 120px;
    }

    .step-buttons {
        flex-direction: column-reverse;
    }

    .persons-btn {
        min-width: 54px!important;
        min-height: 54px!important;
        max-width: 54px!important;
        max-height: 54px!important;
    }
}

/* Success message styling */
.success-ajax-headline {
    display: block;
    font-weight: bold;
    margin-bottom: 0.5rem;
    font-size: 1.1em;
}

.success-ajax-content {
    display: block;
    line-height: 1.4;
}

/* Blocked Reservations */
.reservations-blocked .blocked-message {
    text-align: center;
    padding: 2em;
    background: #f8f8f8;
    border-radius: 8px;
    margin: 2em auto;
    max-width: 600px;
}

.reservations-blocked .blocked-message h2 {
    margin-bottom: 1em;
}

.reservations-blocked .blocked-message p {
    margin-bottom: 1em;
    line-height: 1.6;
}

.reservations-blocked .blocked-message p:last-child {
    margin-bottom: 0;
}

/* SVG animation styles */
#completion {
  width: 20%;
  height: 20%;
  margin: auto;
  display: block;
  margin-bottom: 2em;
}

@keyframes hideshow {
  0% { 
    transform: scale(0.2);
    transform-origin: initial;
  }
  100% { 
    transform: scale(1.0);
    transform-origin: initial;
  }
}

@keyframes draaien {
  0% {
    transform: rotate(40deg);
    transform-origin: initial;
  }
  100% {
    transform: scale(0deg);
    transform-origin: initial;
  }
}

@keyframes transparant {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

#cirkel { 
  animation: hideshow 0.8s ease;
}

#check {
  animation: draaien 1.6s ease, transparant 2s;
}

#stars {
  animation: hideshow 2.0s ease;
  opacity: 0.9;   
}
