/* Reset i podstawowe style */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', sans-serif;
  background-color: #f8f9fa; /* Jasne tło */
  color: #333;
  line-height: 1.6;
}

/* Kontener główny (opcjonalnie, jeśli go używasz w layout) */
.container {
  max-width: 1200px;
  margin: 0 auto;
}

h1 {
  color: #2d3748;
  font-weight: 700;
  margin-bottom: 2rem;
}

.form-select-auto {
  /* Domyślnie, w Bootstrapie, select ma width: 100%.
     Nadpisujemy to, by dopasować się do zawartości. */
  display: inline-block;  /* aby width: auto działało */
  width: auto;
  white-space: nowrap;    /* zapobiega zawijaniu się długich etykiet */
  min-width: 250px;
}


/* Formularze i pola wyboru */
.form-select, .form-control {
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.form-select:focus, .form-control:focus {
  border-color: #4f46e5; /* Fiolet */
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.form-label {
  font-weight: 600;
  font-size: 0.95rem;
  color: #4a5568;
  margin-bottom: 0.5rem;
}

/* MODAL NOWOCzesny */
.modal-modern {
  border: none;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
  overflow: hidden;
}

.modal-header {
  border-bottom: 1px solid #f0f2f5;
  padding: 1.25rem 1.5rem;
  background-color: #fff;
}

.modal-title {
  font-weight: 700;
  font-size: 1.25rem;
  color: #2d3748;
}

.modal-body {
  padding: 1.75rem;
  background-color: #fff;
}

/* Przycisk zamknięcia – nadpisujemy styl Bootstrapa */
.btn-close {
  width: 32px;
  height: 32px;
  background: #f0f2f5;
  border-radius: 50%;
  position: relative;
  opacity: 1;
  transition: all 0.2s ease;
  box-shadow: none; /* Usuwamy ewentualne cienie Bootstrapa */
}

.btn-close:hover {
  background: #e2e8f0;
  transform: rotate(90deg);
}

/* Iksy w przycisku zamknięcia */
.btn-close::before,
.btn-close::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 2px;
  background: #64748b;
  top: 50%;
  left: 50%;
  transition: background 0.2s ease;
}

.btn-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.btn-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.btn-close:hover::before,
.btn-close:hover::after {
  background: #1e293b;
}

.btn-close:focus {
  box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.2);
  outline: none;
}

.term-details, .teacher-photo-modern, .term-card, .btn-primary {
  transform: translateZ(0);
}

/* Styl sekcji z danymi nauczyciela/terminu */
.term-details {
  background-color: #f8fafc;
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}
.term-details:hover {
  transform: translateZ(0) translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  background-color: #f1f5f9;
}

/* Zdjęcie nauczyciela */
.teacher-photo-modern {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border: 3px solid white;
  transition: transform 0.3s ease;
}
.teacher-photo-modern:hover {
  transform: scale(1.05);
}

/* Link do nazwiska */
#teacherName {
  color: #4f46e5;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
  margin-bottom: 0.75rem;
  display: inline-block;
}
#teacherName:hover {
  color: #4338ca;
  text-decoration: underline;
}

/* Dwie kolumny: etykieta + wartość (label / value) */
.teacher-info-item {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  justify-content: center;
}
.teacher-info-label {
  font-weight: 600;
  margin-right: 0.5rem;
  flex: 0 0 auto;
  color: #64748b;
  width: 45%;
  text-align: left;
}
.teacher-info-value {
  flex: 1 1 auto;
  color: #334155;
  width: 55%;
  text-align: left;
}

/* Linie rozdzielające */
hr {
  margin: 1.75rem 0;
  border: none;
  height: 1px;
  background-color: #e2e8f0;
}

/* Formularz rejestracyjny */
.registration-form-modern .form-control {
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  background-color: #f8fafc;
}
.registration-form-modern .form-control:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
  border-color: #4f46e5;
  background-color: #fff;
}
.registration-form-modern .btn {
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85rem 1.5rem;
  margin-top: 1rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Checkbox */
.form-check-input {
  margin-right: 0.5rem;
  border-radius: 4px;
  border: 1px solid #cbd5e0;
  width: 1.1rem;
  height: 1.1rem;
}
.form-check-input:checked {
  background-color: #4f46e5;
  border-color: #4f46e5;
}
.form-check-label {
  font-size: 0.9rem;
  color: #4a5568;
}

/* Styl przycisku głównego */
.btn-primary {
  background-color: #4f46e5;
  border: none;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}
.btn-primary:hover {
  background-color: #4338ca;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.25);
}
.btn-primary:active {
  transform: translateY(0);
}

/* Style dla kart z terminami (jeśli posiadasz taki widok) */
.day-card {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  margin-bottom: 1.5rem;
  background-color: #fff;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.day-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.day-card .card-header {
  background-color: #4f46e5;
  color: white;
  font-weight: 600;
  padding: 1rem;
  text-align: center;
}
.term-card {
  background-color: #f8fafc;
  border-radius: 8px;
  padding: 1rem;
  transition: all 0.3s ease;
  cursor: pointer;
  margin: 0.75rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  border-left: 3px solid #4f46e5;
}
.term-card:hover {
  background-color: #edf2f7;
  transform: translateX(5px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.term-card .time {
  font-weight: 700;
  color: #2d3748;
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}
.term-card .teacher {
  color: #4a5568;
  font-size: 0.9rem;
}

/* Styl dla dni, które nie mają dostępnych terminów */
.no-slots {
  opacity: 0.6;
  border: 2px dashed #cbd5e0;
  background-color: #f1f5f9;
}
.no-slots .card-header {
  background-color: #94a3b8;
}

/* Przycisk "Zapisz się" z ikoną kalendarza obok tekstu */
.btn-signup {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.calendar-icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z' /%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}