/*
  CSS Injector – Formularz rezerwacji sali
  Ograniczony TYLKO do: #webform-client-form-405
  Nie wpływa na żadne inne formularze Webform w Drupalu.

  Widoczność: /pl/rezerwacja-sali (lub Twoja ścieżka)
*/

/* Fonty systemowe – brak JS Injector */

/* ── Zmienne – zakres tylko dla tego formularza ── */
#webform-client-form-405 {
  --green-dark:  #2d5a1b;
  --green-main:  #3d7a26;
  --green-mid:   #4e9a30;
  --green-light: #e8f4e1;
  --green-pale:  #f3faf0;
  --gray-100:    #f5f5f5;
  --gray-200:    #e8e8e8;
  --gray-400:    #aaaaaa;
  --gray-600:    #666666;
  --gray-800:    #333333;
  --text:        #2a2a2a;
  --white:       #ffffff;
  --error:       #c0392b;
  --error-bg:    #fdf3f2;
  --error-border:#e8a09a;
  --radius:      4px;
  --radius-lg:   6px;
  --shadow:      0 1px 4px rgba(0,0,0,0.10);
}

/* ── Wrapper formularza ── */
#webform-client-form-405 {
  font-family: 'Segoe UI', Arial, sans-serif;
  font-size: 13px;
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  max-width: 720px;
}

/* ── Każde pole (form-item) ── */
#webform-client-form-405 .form-item {
  margin-bottom: 14px;
  display: grid;
  grid-template-columns: 1fr;
}

/* ── Etykiety ── */
#webform-client-form-405 .form-item label {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-800);
  letter-spacing: 0.01em;
  margin-bottom: 4px;
  display: block;
}

/* Gwiazdka wymagane */
#webform-client-form-405 .form-required {
  color: var(--error);
  margin-left: 2px;
}

/* ── Pola tekstowe, email, tel, number, date, time, select, textarea ── */
#webform-client-form-405 input[type="text"],
#webform-client-form-405 input[type="email"],
#webform-client-form-405 input[type="tel"],
#webform-client-form-405 input[type="number"],
#webform-client-form-405 input[type="date"],
#webform-client-form-405 input[type="time"],
#webform-client-form-405 select,
#webform-client-form-405 textarea {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--gray-400);
  border-radius: var(--radius);
  font-family: 'Segoe UI', Arial, sans-serif;
  font-size: 13px;
  color: var(--text);
  background: var(--white);
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
  -webkit-appearance: none;
}

#webform-client-form-405 input[type="text"]:focus,
#webform-client-form-405 input[type="email"]:focus,
#webform-client-form-405 input[type="tel"]:focus,
#webform-client-form-405 input[type="number"]:focus,
#webform-client-form-405 input[type="date"]:focus,
#webform-client-form-405 input[type="time"]:focus,
#webform-client-form-405 select:focus,
#webform-client-form-405 textarea:focus {
  outline: none;
  border-color: var(--green-mid);
  box-shadow: 0 0 0 2px rgba(78,154,48,0.15);
}

#webform-client-form-405 textarea {
  min-height: 80px;
  resize: vertical;
}

/* ── Opisy pomocnicze ── */
#webform-client-form-405 .description {
  font-size: 11px;
  color: var(--gray-600);
  margin-top: 3px;
  line-height: 1.4;
}

/* ── Sekcje grup pól (webform-component-fieldset lub podobne) ── */
#webform-client-form-405 .webform-component-fieldset,
#webform-client-form-405 fieldset {
  border: none;
  border-bottom: 1px solid var(--gray-200);
  padding: 20px 24px;
  margin: 0;
}

#webform-client-form-405 .webform-component-fieldset:last-of-type,
#webform-client-form-405 fieldset:last-of-type {
  border-bottom: none;
}

/* Legenda sekcji */
#webform-client-form-405 legend,
#webform-client-form-405 .fieldset-legend {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--green-dark);
  padding: 0 0 10px 10px;
  border-bottom: 2px solid var(--green-light);
  margin-bottom: 16px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
}

#webform-client-form-405 legend::before,
#webform-client-form-405 .fieldset-legend::before {
  content: '';
  display: block;
  width: 3px;
  height: 14px;
  background: var(--green-main);
  border-radius: 2px;
  flex-shrink: 0;
}

/* Jeśli brak fieldset – padding dla pól bezpośrednio w formularzu */
#webform-client-form-405 > div > .form-item,
#webform-client-form-405 > .form-item {
  padding: 0 24px;
}

/* ── Checkboxy i radio ── */
#webform-client-form-405 .webform-component-radios .form-item,
#webform-client-form-405 .webform-component-checkboxes .form-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}

#webform-client-form-405 input[type="checkbox"],
#webform-client-form-405 input[type="radio"] {
  width: 14px;
  height: 14px;
  min-width: 14px;
  margin-top: 2px;
  accent-color: var(--green-main);
  cursor: pointer;
  flex-shrink: 0;
}

#webform-client-form-405 .webform-component-radios label,
#webform-client-form-405 .webform-component-checkboxes label {
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text);
  cursor: pointer;
  margin-bottom: 0;
}

/* ── Błędy walidacji ── */
#webform-client-form-405 .error,
#webform-client-form-405 .form-item.error input,
#webform-client-form-405 .form-item.error select,
#webform-client-form-405 .form-item.error textarea {
  border-color: var(--error-border);
  background: var(--error-bg);
}

#webform-client-form-405 .messages.error {
  font-size: 11px;
  color: var(--error);
  background: var(--error-bg);
  border: 1px solid var(--error-border);
  border-radius: var(--radius);
  padding: 8px 12px;
  margin-bottom: 12px;
}

/* ── Sekcja przycisku submit ── */
#webform-client-form-405 .form-actions,
#webform-client-form-405 #edit-actions {
  padding: 20px 24px;
  background: var(--green-pale);
  border-top: 2px solid var(--green-light);
  margin: 0;
}

/* ── Przycisk Wyślij ── */
#webform-client-form-405 .form-actions input[type="submit"],
#webform-client-form-405 .form-actions button[type="submit"],
#webform-client-form-405 input#edit-submit {
  background: var(--green-main);
  color: #ffffff;
  border: none;
  border-radius: var(--radius);
  font-family: 'Segoe UI', Arial, sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  padding: 10px 28px;
  cursor: pointer;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: background 0.15s;
}

#webform-client-form-405 .form-actions input[type="submit"]:hover,
#webform-client-form-405 input#edit-submit:hover {
  background: var(--green-dark);
}

/* ── Komunikat potwierdzenia ── */
.webform-confirmation {
  background: #eaf7e4;
  border: 1px solid var(--green-mid, #4e9a30);
  color: #2d5a1b;
  border-radius: 4px;
  padding: 14px 18px;
  font-size: 13px;
  font-family: 'Segoe UI', Arial, sans-serif;
  max-width: 720px;
}

/* ── Responsywność ── */
@media (max-width: 600px) {
  #webform-client-form-405 .webform-component-fieldset,
  #webform-client-form-405 fieldset {
    padding: 14px;
  }
  #webform-client-form-405 .form-actions {
    padding: 14px;
  }
  #webform-client-form-405 > div > .form-item {
    padding: 0 14px;
  }
}

/* ── Imię i Nazwisko obok siebie ── */
#webform-component-imie,
#webform-component-nazwisko {
  width: calc(50% - 7px) !important;
  display: inline-block !important;
  vertical-align: top;
}

#webform-component-imie {
  margin-right: 14px;
}


/* ── Mobile: jedna kolumna ── */
@media (max-width: 600px) {
  #webform-component-imie,
  #webform-component-nazwisko,
  #webform-component-godzina-rozpoczecia,
  #webform-component-godzina-zakonczenia {
    width: 100%;
    display: block;
    margin-right: 0;
  }
}

/* ── Godzina rozpoczęcia i zakończenia obok siebie ── */
#webform-component-godzina-rozpoczecia,
#webform-component-godzina-zakonczenia {
  width: calc(50% - 7px) !important;
  display: inline-block !important;
  vertical-align: top;
}

#webform-component-godzina-rozpoczecia {
  margin-right: 14px;
}

/* ── Selekty godzina+minuta w jednej linii ── */
#webform-component-godzina-rozpoczecia .form-item,
#webform-component-godzina-zakonczenia .form-item {
  display: inline-block !important;
  width: auto !important;
  margin-right: 6px;
  margin-bottom: 0;
}

/* ── Mobile ── */
@media (max-width: 600px) {
  #webform-component-godzina-rozpoczecia,
  #webform-component-godzina-zakonczenia {
    width: 100% !important;
    display: block !important;
    margin-right: 0;
  }
}

/* ── Godzina rozpoczęcia i zakończenia obok siebie ── */
#webform-component-godzin-rozpoczecia,
#webform-component-godzin-zakonczenia {
  width: calc(50% - 7px) !important;
  display: inline-block !important;
  vertical-align: top;
}

#webform-component-godzin-rozpoczecia {
  margin-right: 14px;
}

/* ── Selekty godzina+minuta w jednej linii ── */
#webform-component-godzin-rozpoczecia .form-item,
#webform-component-godzin-zakonczenia .form-item {
  display: inline-block !important;
  width: auto !important;
  margin-right: 6px;
  margin-bottom: 0;
}

/* ── Mobile ── */
@media (max-width: 600px) {
  #webform-component-godzin-rozpoczecia,
  #webform-component-godzin-zakonczenia {
    width: 100% !important;
    display: block !important;
    margin-right: 0;
  }
}


/* Ukryj pola rok/miesiąc/dzień – zostaw tylko ikonkę */
#webform-client-form-405 .form-item-submitted-data-year,
#webform-client-form-405 .form-item-submitted-data-month,
#webform-client-form-405 .form-item-submitted-data-day {
  position: absolute !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* Ikonka kalendarza – większa i klikalna */
#webform-client-form-405 .webform-calendar {
  display: inline-block !important;
  cursor: pointer !important;
  font-size: 24px !important;
  margin-top: 4px !important;
}
/* ── Ikonka kalendarza – większa ── */
#webform-client-form-405 input.webform-calendar {
  width: 50px !important;
  height: 50px !important;
  cursor: pointer !important;
  margin-top: 8px !important;
  opacity: 0.8;
  transition: opacity 0.15s;
}

#webform-client-form-405 input.webform-calendar:hover {
  opacity: 1;
}
