/* Patienten Form Styles
 * Mobile-first responsive design
 * (Formular immer hell, unabhängig vom Dark Mode)
 */

.patienten-wrapper {
    max-width: 640px; /* var(--container-sm) */
    margin: 0 auto;
    padding: 20px; /* var(--space-20) */
    background: #fdfdfb;
}

.buchungsformular {
    background: #ffffff;
    padding: 20px;
    border-radius: 12px; /* var(--radius-lg) */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.04),
                0 2px 4px -1px rgba(0, 0, 0, 0.02); /* var(--shadow-md) */
    border: 1px solid rgba(94, 82, 64, 0.12);
    color: #13343b; /* angelehnt an var(--color-slate-900) */
}

.buchungsformular h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #13343b;
    font-size: 24px; /* var(--font-size-2xl) */
    font-weight: 550; /* var(--font-weight-semibold) */
    line-height: 1.2;
}

.form-page {
    animation: fadeIn 250ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.form-field {
    margin-bottom: 20px;
}

.form-field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 550;
    color: #13343b;
    font-size: 12px; /* var(--font-size-sm) */
}

/* Eingabefelder immer hell */
.form-field input[type="text"],
.form-field input[type="tel"],
.form-field input[type="date"],
.form-field input[type="email"],
.form-field select {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(19, 36, 59, 0.2);
    border-radius: 8px;
    font-size: 16px; /* var(--font-size-lg) */
    font-family: "FKGroteskNeue", "Geist", "Inter", -apple-system,
      BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #13343b;
    background-color: #ffffff;
    box-sizing: border-box;
    transition:
        border-color 150ms cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 150ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Select mit fixer Caret-Grafik (immer dunkel) */
.form-field select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23134252' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 32px;
}

/* ===== Geburtstagsdatum-Dropdown-Picker ===== */
.dob-dropdown-wrapper {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 8px;
    align-items: center;
}

.dob-dropdown-wrapper .dob-select {
    flex: 1;
    min-width: 0; /* Flex-Kinder dürfen schrumpfen */
}

/* Tag und Monat etwas kleiner, Jahr breiter */
.dob-dropdown-wrapper .dob-tag   { flex: 1.1; }
.dob-dropdown-wrapper .dob-monat { flex: 2;   }
.dob-dropdown-wrapper .dob-jahr  { flex: 1.8; }

@media (max-width: 480px) {
    .dob-dropdown-wrapper {
        gap: 6px;
    }
    .dob-dropdown-wrapper .dob-select {
        padding: 10px 28px 10px 8px; /* weniger Innenabstand auf Mobile */
        font-size: 14px;
    }
}

.form-field input:focus,
.form-field select:focus {
    outline: 2px solid #21808d;
    outline-offset: 2px;
    border-color: #21808d;
    box-shadow: 0 0 0 3px rgba(33, 128, 141, 0.4);
}

.form-field.field-error input,
.form-field.field-error select {
    border-color: #c0152f;
}

.field-hint {
    font-size: 11px;
    color: #626c71;
    margin: 4px 0;
    font-style: italic;
}

.tooltip-trigger {
    display: inline-block;
    margin-left: 4px;
    cursor: help;
    color: #21808d;
}

.tooltip-bubble {
    position: absolute;
    background: #13343b;
    color: #ffffff;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 11px;
    max-width: 250px;
    z-index: 1000;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.04),
                0 4px 6px -2px rgba(0, 0, 0, 0.02);
}

.plz-feedback {
    margin-top: 8px;
    font-size: 11px;
    font-weight: 550;
    color: #13343b;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-group label {
    font-weight: 400;
    cursor: pointer;
    color: #13343b;
}

/* Warnbox, fest auf hell */
.warning-gesetzlich {
    padding: 12px;
    background: rgba(230, 129, 97, 0.15);
    border-left: 4px solid #a84b2f;
    border-radius: 8px;
    font-size: 14px;
    color: #a84b2f;
}

.data-summary {
    background: rgba(94, 82, 64, 0.12);
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid rgba(94, 82, 64, 0.12);
}

.summary-table {
    width: 100%;
    border-collapse: collapse;
}

.summary-table td {
    padding: 8px;
    border-bottom: 1px solid rgba(94, 82, 64, 0.12);
    font-size: 14px;
    color: #13343b;
}

/* Buttons im Formular */

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 24px;
}

.form-actions button {
    flex: 1;
    padding: 16px 20px;
    font-size: 16px;
    font-weight: 550;
    font-family: "FKGroteskNeue", "Geist", "Inter", -apple-system,
      BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 250ms cubic-bezier(0.16, 1, 0.3, 1);
    line-height: 1.5;
}

.form-actions button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(33, 128, 141, 0.4);
}

.prev-page-button {
    background: rgba(94, 82, 64, 0.12);
    color: #13343b;
    border: 1px solid rgba(94, 82, 64, 0.2);
}

.prev-page-button:hover {
    background: rgba(94, 82, 64, 0.2);
}

.prev-page-button:active {
    background: rgba(94, 82, 64, 0.25);
}

.next-page-button,
.submit-button {
    background: #21808d;
    color: #fdfdf9;
}

.next-page-button:hover,
.submit-button:hover {
    background: #1d7480;
}

.next-page-button:active,
.submit-button:active {
    background: #1a6873;
}

.spinner {
    display: inline-block;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.form-message {
    margin-top: 20px;
    padding: 16px;
    border-radius: 8px;
    font-weight: 550;
    text-align: center;
    background: #ffffff;
    color: #13343b;
    border: 1px solid rgba(94, 82, 64, 0.12);
}

/* Mobile portrait breakpoint */
@media (max-width: 480px) {
    .patienten-wrapper {
        padding: 16px;
    }
    
    .buchungsformular {
        padding: 16px;
    }
    
    .buchungsformular h3 {
        font-size: 18px; /* var(--font-size-xl) */
        margin-bottom: 16px;
    }
    
    .form-field {
        margin-bottom: 16px;
    }
    
    .form-field input[type="text"],
    .form-field input[type="tel"],
    .form-field input[type="date"],
    .form-field input[type="email"],
    .form-field select {
        font-size: 14px;
        padding: 10px;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .form-actions button {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .tooltip-bubble {
        max-width: 200px;
        padding: 8px 12px;
    }
}

/* Tablet und Desktop */
@media (min-width: 768px) {
    .patienten-wrapper {
        max-width: 768px;
        padding: 32px 20px;
    }
    
    .buchungsformular {
        padding: 32px;
    }
    
    .form-row {
        display: flex;
        gap: 20px;
    }
    
    .form-field.half {
        flex: 1;
    }
    
    .radio-group {
        flex-direction: row;
        gap: 20px;
    }
}

/* Schriftart wie im ursprünglichen System */
@font-face {
  font-family: 'FKGroteskNeue';
  src: url('https://r2cdn.perplexity.ai/fonts/FKGroteskNeue.woff2') format('woff2');
}
/* Progress Bar Styles */
.form-progress-bar-container {
    margin-bottom: 24px;
}

.form-progress-text {
    font-size: 13px;
    color: #626c71;
    margin-bottom: 8px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-progress-track {
    width: 100%;
    height: 6px;
    background: rgba(94, 82, 64, 0.12);
    border-radius: 3px;
    overflow: hidden;
}

.form-progress-fill {
    height: 100%;
    background: #21808d;
    border-radius: 3px;
    transition: width 300ms ease-in-out;
}
