/* public/css/style.css */

/* === Style Ogólne === */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; /* Lepsza systemowa czcionka */
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: #f8f9fa;
  color: #212529;
  font-size: 16px; /* Domyślny rozmiar czcionki */
  line-height: 1.5; /* Interlinia */
}

.main-content {
  flex: 1;
  padding: 20px;
}

/* Kontener ograniczający szerokość */
.container, .container-fluid {
  width: 100%;
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;
}
@media (min-width: 576px) { .container { max-width: 540px; } }
@media (min-width: 768px) { .container { max-width: 720px; } }
@media (min-width: 992px) { .container { max-width: 960px; } }
@media (min-width: 1200px) { .container { max-width: 1140px; } }
/* .container-fluid pozostaje 100% szerokości */


/* Odstępy (klasy pomocnicze) */
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mr-2 { margin-right: 0.5rem !important; }

/* Przyciski (Podstawowe style, można użyć Bootstrapa) */
.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  border: 1px solid transparent;
  border-radius: 0.25rem;
  transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;
}
.btn:hover { text-decoration: none; } /* Usuń podkreślenie przy najechaniu */
.btn-sm { padding: 0.25rem 0.5rem; font-size: 0.875rem; border-radius: 0.2rem; margin-right: 5px; margin-bottom: 5px; }
.btn-lg { padding: .75rem 1.25rem; font-size: 1.1rem; }
.btn-primary { color: #fff; background-color: #007bff; border-color: #007bff; }
.btn-primary:hover { color: #fff; background-color: #0056b3; border-color: #0056b3; }
.btn-secondary { color: #fff; background-color: #6c757d; border-color: #6c757d; }
.btn-secondary:hover { color: #fff; background-color: #5a6268; border-color: #545b62; }
.btn-success { color: #fff; background-color: #28a745; border-color: #28a745; }
.btn-success:hover { color: #fff; background-color: #1e7e34; border-color: #1c7430; }
.btn-danger { color: #fff; background-color: #dc3545; border-color: #dc3545; }
.btn-danger:hover { color: #fff; background-color: #b02a37; border-color: #a52834; }
.btn-warning { color: #212529; background-color: #ffc107; border-color: #ffc107; }
.btn-warning:hover { color: #212529; background-color: #d39e00; border-color: #c69500; }
.btn-info { color: #fff; background-color: #17a2b8; border-color: #17a2b8; }
.btn-info:hover { color: #fff; background-color: #117a8b; border-color: #10707f; }
.btn-outline-secondary { color: #6c757d; border-color: #6c757d; background-color: transparent; }
.btn-outline-secondary:hover { color: #fff; background-color: #6c757d; border-color: #6c757d; }
.btn-outline-success { color: #28a745; border-color: #28a745; background-color: transparent; }
.btn-outline-success:hover { color: #fff; background-color: #28a745; border-color: #28a745; }
/* Styl dla nieaktywnych/wyłączonych przycisków */
.btn:disabled { opacity: .65; cursor: not-allowed; }

/* Ikony w przyciskach */
.btn i.fas { margin-right: 0.4em; }

/* === Nawigacja (Navbar) - POPRAWIONA v4 === */
/* Reset dla navbara - usuwa potencjalne konflikty */
.navbar, .navbar * {
  box-sizing: border-box;
}

.navbar {
  background-color: #343a40;
  color: white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  position: relative;
  height: 60px; /* Sztywna wysokość */
  width: 100%;
  margin: 0;
  padding: 0;
  display: block;
}

/* Kontener wewnątrz navbara */
.navbar .container {
  display: flex !important; /* Force flex */
  flex-direction: row !important;
  justify-content: space-between !important;
  align-items: center !important;
  width: 100% !important;
  max-width: 1200px;
  margin: 0 auto;
  height: 60px !important; /* Taka sama jak navbar */
  padding: 0 1rem;
}

/* Sekcja lewa (Brand + Główne linki) */
.navbar-left {
  display: flex !important;
  flex-direction: row !important;
  justify-content: flex-start !important;
  align-items: center !important;
  height: 100%;
  flex: 1;
}

/* Sekcja prawa (Linki admina + Info + Logout) */
.navbar-right {
  display: flex !important;
  flex-direction: row !important;
  justify-content: flex-end !important;
  align-items: center !important;
  height: 100%;
}

/* Logo */
.navbar-brand {
  display: flex;
  align-items: center;
  height: 100%;
  margin-right: 2rem;
}

.navbar-brand a {
  color: #f8f9fa;
  text-decoration: none;
  font-size: 1.3em;
  font-weight: bold;
  padding: 0.25rem 0;
  line-height: normal;
  white-space: nowrap;
}

.navbar-brand a:hover {
  color: #ffffff;
}

/* Wspólne style dla obu list nawigacyjnych */
.navbar-nav {
  display: flex !important;
  flex-direction: row !important;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  height: 100% !important;
  align-items: center !important;
}

/* Elementy listy */
.navbar-nav > li {
  display: flex !important;
  align-items: center !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

.navbar-nav > li + li {
  margin-left: 0.8rem !important;
}

/* Linki w navbar-nav */
.navbar-nav a:not(.btn) {
  display: flex !important;
  align-items: center !important;
  height: 100% !important;
  padding: 0 0.6rem !important;
  color: rgba(255, 255, 255, 0.75) !important;
  text-decoration: none !important;
  transition: background-color 0.2s, color 0.2s !important;
  border-radius: 4px !important;
  font-size: 0.95em !important;
}

.navbar-nav a:not(.btn):hover,
.navbar-nav li.active a:not(.btn) {
  background-color: rgba(255, 255, 255, 0.1) !important;
  color: white !important;
}

/* Info o użytkowniku */
.nav-user-info {
  color: rgba(255, 255, 255, 0.8) !important;
  margin-left: 1.5rem !important;
  margin-right: 0.75rem !important;
  white-space: nowrap !important;
  font-size: 0.95em !important;
  display: flex !important;
  align-items: center !important;
}

/* Przycisk wyloguj */
.navbar-nav li.logout {
  display: flex !important;
  align-items: center !important;
}

.navbar-nav li.logout a.btn {
  background-color: #dc3545 !important;
  border-color: #dc3545 !important;
  color: white !important;
  border-radius: 4px !important;
  text-decoration: none !important;
  padding: 0.3rem 0.7rem !important;
  font-size: 0.9em !important;
  line-height: 1.4 !important;
  display: block !important;
}
.nav-item.placowka-custom-dropdown {
    position: relative; /* Ważne dla pozycjonowania menu */
    display: flex; /* Aby wyrównać z innymi elementami li jeśli trzeba */
    align-items: center;
}

.placowka-dropdown-trigger {
    /* Stylizuj jak inne linki/przyciski w navbarze */
    /* np. color: white; text-decoration: none; padding: 10px 15px; display: block; */
    display: flex; /* Aby nazwa i strzałka były w jednej linii */
    align-items: center;
    cursor: pointer;
    /* Upewnij się, że ma te same właściwości co .navbar-nav-main a, .navbar-nav-user a */
    /* np. z pliku style.css Twojej aplikacji */
    color: #ffffff; /* Przykładowy kolor tekstu */
    padding: 0.5rem 1rem; /* Dostosuj padding */
    text-decoration: none;
    background-color: transparent; /* Dopasuj do tła navbar */
    border: none; /* Jeśli wygląda jak przycisk, a nie link */
    line-height: inherit; /* Aby zgadzało się z innymi linkami */
}

.placowka-dropdown-trigger:hover {
    /* np. background-color: #555; */ /* Taki sam hover jak inne elementy */
}

.placowka-dropdown-trigger .dropdown-arrow-icon {
    margin-left: 8px;
    font-size: 0.8em;
}

.placowka-dropdown-content {
    display: none; /* Początkowo ukryte */
    position: absolute;
    top: 100%; /* Pozycjonowanie pod przyciskiem */
    left: 0; /* lub right: 0; w zależności od wyrównania */
    background-color: #333; /* Tło dropdownu */
    border: 1px solid #444;
    border-radius: 4px;
    min-width: 160px; /* Minimalna szerokość */
    z-index: 1000; /* Aby było nad innymi elementami */
    list-style: none;
    padding: 0;
    margin: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.placowka-dropdown-content.show {
    display: block; /* Pokazywane przez JavaScript */
}

.placowka-dropdown-form-item {
    margin: 0;
}

.placowka-dropdown-button {
    display: block;
    width: 100%;
    padding: 10px 15px;
    text-align: left;
    background-color: transparent;
    color: #f0f0f0; /* Kolor tekstu opcji */
    border: none;
    cursor: pointer;
    font-size: inherit; /* Aby pasowało do reszty tekstu */
}

.placowka-dropdown-button:hover,
.placowka-dropdown-button.active {
    background-color: #555; /* Tło dla aktywnej/hover opcji */
    color: #fff;
}
.navbar-nav li.logout a.btn:hover {
  background-color: #c82333 !important;
  border-color: #bd2130 !important;
}
/* === Komunikaty Flash (Alerts) === */
.alert {
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
  border-radius: 0.25rem;
  position: relative;
}
.alert-dismissible .close {
  position: absolute;
  top: 0;
  right: 0;
  padding: 0.75rem 1.25rem;
  color: inherit;
  background-color: transparent;
  border: 0;
  appearance: none;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  opacity: .5;
  cursor: pointer;
}
.alert-dismissible .close:hover { opacity: .75; text-decoration: none;}
.alert-success { color: #0f5132; background-color: #d1e7dd; border-color: #badbcc; }
.alert-danger { color: #842029; background-color: #f8d7da; border-color: #f5c2c7; }
.alert-info { color: #055160; background-color: #cff4fc; border-color: #b6effb; }
.alert-warning { color: #664d03; background-color: #fff3cd; border-color: #ffecb5; }

/* === Formularze === */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: .5rem; font-weight: bold; }
.form-control {
  display: block; width: 100%; padding: .375rem .75rem; font-size: 1rem;
  font-weight: 400; line-height: 1.5; color: #495057; background-color: #fff;
  background-clip: padding-box; border: 1px solid #ced4da; border-radius: .25rem;
  transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out; box-sizing: border-box;
}
/* Walidacja Bootstrap */
.was-validated .form-control:invalid, .form-control.is-invalid { border-color: #dc3545; }
.was-validated .form-control:valid, .form-control.is-valid { border-color: #28a745; }
.invalid-feedback { display: none; width: 100%; margin-top: .25rem; font-size: 80%; color: #dc3545; }
.was-validated .form-control:invalid ~ .invalid-feedback,
.was-validated .form-check-input:invalid ~ .invalid-feedback { display: block; }

select.form-control:not([size]):not([multiple]) { height: calc(2.25rem + 2px); }
input[readonly].form-control { background-color: #e9ecef; opacity: 1; }
.form-text.text-muted { color: #6c757d!important; font-size: 0.875em; margin-top: .25rem; }
.form-check { display: flex; align-items: center; margin-bottom: 0.5rem;}
.form-check-input { margin-top: 0.1rem; margin-right: 0.5rem; width: 1.1em; height: 1.1em;}
.form-check-label { margin-bottom: 0; }
.form-buttons { margin-top: 1.5rem; }
.form-buttons .btn { margin-right: 0.5rem; }
.form-inline { display: flex; flex-flow: row wrap; align-items: center; }
.form-inline .form-group { margin-right: 10px; margin-bottom: 10px; }
.form-inline .form-control { display: inline-block; width: auto; vertical-align: middle; }
.flex-grow-1 { flex-grow: 1 !important; }

/* === Tabele === */
.table { width: 100%; margin-bottom: 1rem; color: #212529; border-collapse: collapse; }
.table th, .table td { padding: 0.75rem; vertical-align: middle; border-top: 1px solid #dee2e6; }
.table thead th { vertical-align: bottom; border-bottom: 2px solid #dee2e6; background-color: #e9ecef; font-weight: 600;}
.table-striped tbody tr:nth-of-type(odd) { background-color: rgba(0,0,0,.04); }
.table-bordered { border: 1px solid #dee2e6; }
.table-bordered th, .table-bordered td { border: 1px solid #dee2e6; }
.table-hover tbody tr:hover { color: #212529; background-color: rgba(0,0,0,.075); }
.table-responsive { display: block; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-sm th, .table-sm td { padding: .5rem; }
.text-right { text-align: right !important; }

/* === Etykiety (Badges) === */
.badge { display: inline-block; padding: .35em .65em; font-size: .75em; font-weight: 700; line-height: 1; text-align: center; white-space: nowrap; vertical-align: baseline; border-radius: .25rem; }
.badge-success { color: #fff; background-color: #28a745; }
.badge-secondary { color: #fff; background-color: #6c757d; }
.badge-info { color: #fff; background-color: #17a2b8; }
.badge-warning { color: #212529; background-color: #ffc107; }
.badge-danger { color: #fff; background-color: #dc3545; }

/* === Karty (Cards) === */
.card { position: relative; display: flex; flex-direction: column; min-width: 0; word-wrap: break-word; background-color: #fff; background-clip: border-box; border: 1px solid rgba(0,0,0,.125); border-radius: .25rem; margin-bottom: 1.5rem; }
.card-header { padding: .75rem 1.25rem; margin-bottom: 0; background-color: rgba(0,0,0,.03); border-bottom: 1px solid rgba(0,0,0,.125); font-weight: bold; }
.card-header i { margin-right: 8px; }
.card-body { flex: 1 1 auto; padding: 1.25rem; }
.card-footer { padding: .75rem 1.25rem; background-color: rgba(0,0,0,.03); border-top: 1px solid rgba(0,0,0,.125); }
.text-right { text-align: right; }

/* === Style dla Login === */
.login-container { max-width: 400px; margin: 50px auto; padding: 30px; border: 1px solid #dee2e6; border-radius: 5px; background-color: #fff; box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,.075); }
.login-container h1 { text-align: center; margin-bottom: 1.5rem; font-size: 1.75rem; }
.btn-block { display: block; width: 100%; }

/* === Style dla Kalendarzy (FullCalendar - podstawowe) === */
#availability-calendar, #schedule-calendar, #calendar {
  max-width: 1100px;
  margin: 20px auto;
  background-color: white;
  padding: 15px;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.fc-event { cursor: pointer; } /* Wskaźnik myszy dla klikalnych eventów */

/* === Style dla Modali === */
.modal { z-index: 1050; }
.modal-backdrop { z-index: 1040; }
.modal-header .close { background: transparent; border: 0; font-size: 1.5rem; font-weight: 700; line-height: 1; opacity: .5; padding: 1rem; margin: -1rem -1rem -1rem auto;}
.modal-header .close:hover { opacity: .75; text-decoration: none;}

/* === Style dla Profilu Pacjenta === */
.list-group-item small em { font-size: 0.9em; color: #555;} /* Lepszy wygląd info o anulowaniu */
dl.row dt { font-weight: bold; } /* Pogrubienie etykiet w liście definicji */
dl.row dd { margin-bottom: .5rem; }

/* === Animacja dla spinnera === */
.fa-spin { animation: fa-spin 1.5s infinite linear; }
@keyframes fa-spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* === Stopka === */
.footer {
  background-color: #e9ecef;
  color: #6c757d;
  text-align: center;
  padding: 15px 0;
  margin-top: 30px;
  font-size: 0.9em;
  border-top: 1px solid #dee2e6;
}