/* --- Ogólne Style --- */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    background-color: #f8f9fa;
    color: #343a40;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* --- Główny Kontener --- */
.container {
    max-width: 450px;
    width: 100%;
    background: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px-12px rgba(0, 0, 0, 0.08);
    text-align: center;
    box-sizing: border-box;
}

.welcome-container {
    max-width: 600px;
}

/* --- Elementy Tekstowe --- */
h1 {
    font-size: 28px;
    color: #212529;
    margin-top: 0;
}

.subtitle {
    color: #6c757d;
    margin-bottom: 30px;
}

.quote-wrapper {
    min-height: 120px; /* Zapobiega "skakaniu" layoutu podczas ładowania */
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-bottom: 30px;
}

#quote-text {
    font-size: 18px;
    font-style: italic;
    color: #495057;
}

.author-text {
    font-weight: bold;
    text-align: right;
    margin-top: 10px;
}

.separator {
    margin: 20px 0;
    color: #adb5bd;
}

.error-text {
    color: #dc3545;
    margin-top: 15px;
    min-height: 1.2em;
}

/* --- Pola i Przyciski --- */
.input-field {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    border: 1px solid #ced4da;
    box-sizing: border-box;
    font-size: 16px;
}

.button-primary {
    width: 100%;
    padding: 12px 15px;
    border: none;
    background-color: #007bff;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.2s;
}

.button-primary:hover {
    background-color: #0056b3;
}

.button-secondary {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ced4da;
    background-color: #fff;
    color: #495057;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.2s;
}

.button-secondary:hover {
    background-color: #f1f3f5;
}

.button-secondary img {
    height: 20px;
    margin-right: 10px;
}

/* --- Logo --- */
.logo {
    max-width: 120px;
    height: auto;
    margin-bottom: 20px;
}
/* --- Style dla Dashboardów --- */
.dashboard-container {
    max-width: 960px;
    width: 100%;
    background: #ffffff;
    padding: 20px 40px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    box-sizing: border-box;
    text-align: left;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.header h1 {
    margin: 0;
}

.button-secondary-small {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    background-color: #f8f9fa;
    color: #495057;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.button-secondary-small:hover {
    background-color: #e9ecef;
}

.dashboard-content {
    padding: 10px 0;
}
/* --- Style dla Dashboardu Pacjenta --- */
.header-nav {
    display: flex;
    gap: 10px;
}

.filter-section {
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-section p {
    margin: 0;
    font-weight: bold;
}

.radio-group label {
    margin: 0 10px 0 2px;
}

.therapist-list-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.therapist-card {
    display: flex;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    gap: 15px;
    align-items: center;
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.2s;
}

.therapist-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.therapist-card img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.therapist-info {
    text-align: left;
}

.therapist-info h3 {
    margin: 0 0 5px 0;
}

.therapist-info .specialization {
    margin: 0;
    font-weight: bold;
    color: #007bff;
}

.therapist-info .consultations {
    margin: 5px 0 0 0;
    font-size: 14px;
    color: #6c757d;
}
/* --- Style dla Formularza Profilu --- */
.profile-form {
    text-align: left;
}

.profile-form label {
    display: block;
    margin-top: 15px;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 14px;
    color: #495057;
}

.input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.input-group .input-field {
    flex-grow: 1; /* Pole tekstowe zajmie dostępną przestrzeń */
    margin-bottom: 0;
}

.separator-line {
    border-top: 1px solid #dee2e6;
    margin: 30px 0;
}

.status-text {
    color: #28a745; /* Zielony */
    text-align: center;
    min-height: 1.2em;
}

.info-box {
    margin-top: 20px;
    padding: 15px;
    background-color: #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
}

.info-box p {
    text-align: center;
    margin: 0;
}
/* --- Style dla Listy Konsultacji --- */
.consultation-list-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.consultation-card {
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}

.consultation-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
    border-color: #007bff;
}

.consultation-info {
    text-align: left;
}

.consultation-info h3 {
    margin: 0 0 5px 0;
    font-size: 18px;
}

.consultation-info .price {
    margin: 0;
    font-weight: bold;
    font-size: 16px;
    color: #007bff;
}
/* --- Style dla Kalendarza Rezerwacji --- */
#date-picker {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    border: 1px solid #ced4da;
    box-sizing: border-box;
    font-size: 16px;
}

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

.slot-button {
    width: 100%;
}
/* --- Style dla Listy Rezerwacji --- */
.bookings-list-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.booking-card {
    display: flex;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    gap: 15px;
    align-items: center;
}

/* Styl dla rezerwacji z przeszłości */
.booking-card.past {
    background-color: #f8f9fa;
    opacity: 0.7;
}

.booking-card img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0; /* <-- KLUCZOWA POPRAWKA */
}

.booking-details {
    flex-grow: 1;
    text-align: left;
}

.booking-details h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
}

.booking-details .detail-row {
    margin: 2px 0;
    font-size: 14px;
    color: #495057;
}

.button-cancel {
    padding: 8px 12px;
    border: 1px solid #dc3545;
    background-color: transparent;
    color: #dc3545;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s, color 0.2s;
}

.button-cancel:hover {
    background-color: #dc3545;
    color: #fff;
}

/* Styl dla przełącznika */
.switch-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}
/* --- Style dla Dashboardu Terapeuty --- */
.main-nav-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.add-slots-section {
    margin-top: 20px;
    padding: 20px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

.add-slots-section h3 {
    margin-top: 0;
}

.time-inputs {
    display: flex;
    gap: 15px;
    margin: 10px 0;
    flex-wrap: wrap;
}

.input-wrapper {
    flex-grow: 1;
}

.input-wrapper label {
    display: block;
    font-size: 14px;
    margin-bottom: 5px;
}
/* --- Style dla Formularza Profilu Terapeuty --- */
.radio-group-vertical div {
    margin-bottom: 5px;
}
.checkbox-wrapper {
    margin-top: 10px;
}
.consultations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    margin-top: 10px;
}
.consultation-field {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 8px;
}
.consultation-field label {
    flex-grow: 1;
    margin: 0;
    font-weight: normal;
}
.consultation-field .price-field {
    width: 80px;
    margin: 0;
    text-align: right;
}
/* --- Style dla Grup Wyboru (Radio/Checkbox) --- */
.selection-group {
    display: flex;
    flex-direction: column; /* Układ pionowy dla całej grupy */
    gap: 5px; /* Odstęp między elementami w grupie */
    margin-top: 5px;
}

.selection-item {
    display: flex;
    align-items: center; /* Wyrównuje checkbox/radio z tekstem w pionie */
    padding: 8px;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.selection-item:hover {
    background-color: #f8f9fa; /* Lekkie podświetlenie po najechaniu */
}

.selection-item input {
    margin-right: 10px; /* Odstęp między polem wyboru a tekstem */
}

.selection-item label {
    margin: 0; /* Resetujemy domyślne marginesy etykiety */
    font-weight: normal;
    cursor: pointer;
}
/* --- Dodatkowe style dla Harmonogramu Terapeuty --- */
.separator-line-small {
    border-top: 1px solid #e9ecef;
    margin: 8px 0;
}
/* --- Style dla Przeglądania Kalendarza --- */
/* Styl dla kalendarza Vanilla JS, aby kropki były widoczne */
.vanilla-calendar-day--popup.has-slots:after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 5px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #007bff;
    transform: translateX(-50%);
}

.slots-list-container-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.slot-item {
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    cursor: pointer;
    border: 1px solid transparent;
}

.slot-item.free {
    background-color: #e8f5e9; /* Jasnozielony */
    border-color: #c8e6c9;
    color: #2e7d32;
}

.slot-item.booked {
    background-color: #ffebee; /* Jasnoczerwony */
    border-color: #ffcdd2;
    color: #c62828;
}
/* --- Style dla Szablonu Tygodniowego --- */
.template-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}
.template-row .day-label {
    flex-basis: 120px; /* Stała szerokość dla nazwy dnia */
    font-weight: bold;
}
.template-row .time-field {
    width: 120px;
}
.action-buttons-vertical {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
    max-width: 320px;
}
.button-secondary-danger {
    /* Kopiujemy styl z button-secondary i zmieniamy kolory */
    padding: 12px 15px;
    border: 1px solid #dc3545;
    background-color: #fff;
    color: #dc3545;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.2s, color 0.2s;
}
.button-secondary-danger:hover {
    background-color: #dc3545;
    color: #fff;
}
.status-text-info {
    color: #007bff;
}
.status-text-success {
    color: #28a745;
}
/* --- Style dla Sekcji Zdjęcia Profilowego --- */
.profile-image-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}
#profile-image-preview {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #dee2e6;
    margin-bottom: 10px;
}
/* --- Style dla Nagłówka Profilu Terapeuty (Poprawione) --- */
.therapist-profile-header {
    display: flex;
    align-items: center;
    gap: 20px; /* Zwiększony odstęp dla lepszego wyglądu */
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #dee2e6;
}

/* Użyjemy nowej, dedykowanej klasy dla awatara */
.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;   /* To tworzy idealne kółko */
    object-fit: cover;    /* To gwarantuje, że zdjęcie wypełni kółko bez zniekształceń */
    border: 3px solid #f0f0f0;
    flex-shrink: 0;       /* Kluczowe: zapobiega kurczeniu się zdjęcia */
}

.therapist-profile-header .therapist-info h2 {
    margin: 0;
    font-size: 24px;
    font-weight: bold;
    color: #343a40;
}