/* ============================================================
   DJ Ankieta Weselna — Styles
   Paleta: czerń #1a1a2e | złoto #f48c03 | biały #ffffff
   ============================================================ */

/* === RESET / BASE === */
#daw-haslo-wrapper *,
#daw-formularz-wrapper * {
  box-sizing: border-box;
  min-width: 0;        /* kluczowe: zapobiega "grid blowout" — grid/flex dzieci nie mogą rosnąć ponad kontener */
}

#daw-formularz-wrapper {
  overflow-x: hidden;  /* żaden element nie może wystawać poza wrapper */
}

/* ============================================================
   EKRAN HASŁA
   ============================================================ */

#daw-haslo-wrapper {
  max-width: 460px;
  margin: 48px auto;
  padding: 44px 40px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  text-align: center;
  font-family: 'Segoe UI', Tahoma, Geneva, sans-serif;
}

.daw-haslo-ikona {
  font-size: 48px;
  margin-bottom: 8px;
  display: block;
}

.daw-haslo-tytul {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 10px;
}

.daw-haslo-info {
  color: #555;
  font-size: 15px;
  margin: 0 0 24px;
  line-height: 1.5;
}

#daw-haslo-blad {
  background: #ffebee;
  color: #c62828;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 14px;
  text-align: left;
}

#daw-haslo-input {
  width: 100%;
  padding: 13px 16px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.2s;
  margin-bottom: 12px;
  display: block;
}

#daw-haslo-input:focus {
  outline: none;
  border-color: #f48c03;
  box-shadow: 0 0 0 3px rgba(244, 140, 3, 0.2);
}

#daw-haslo-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #f48c03, #b8960b);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: opacity 0.2s, transform 0.15s;
}

#daw-haslo-btn:hover:not(:disabled) {
  opacity: 0.92;
  transform: translateY(-1px);
}

#daw-haslo-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ============================================================
   NAGŁÓWEK FORMULARZA
   ============================================================ */

#daw-formularz-wrapper {
  max-width: 820px;
  margin: 24px auto;
  font-family: 'Segoe UI', Tahoma, Geneva, sans-serif;
  color: #333;
}

.daw-naglowek {
  background: linear-gradient(135deg, #252547, #3a3a62);
  color: #fff;
  padding: 32px 36px;
  border-radius: 12px 12px 0 0;
  margin-bottom: 0;
}

.daw-naglowek h1 {
  margin: 0 0 10px;
  font-size: 26px;
  color: #f48c03;
  letter-spacing: 0.5px;
}

.daw-naglowek p {
  margin: 0;
  color: #ccc;
  font-size: 14px;
  line-height: 1.6;
}

/* ============================================================
   KOMUNIKATY SUKCESU I BŁĘDU
   ============================================================ */

#daw-sukces {
  background: #e8f5e9;
  color: #2e7d32;
  padding: 24px 28px;
  border-radius: 8px;
  font-size: 17px;
  font-weight: 600;
  text-align: center;
  margin: 20px 0;
  border-left: 5px solid #4caf50;
  line-height: 1.6;
}

#daw-formularz-blad {
  background: #ffebee;
  color: #c62828;
  padding: 14px 18px;
  border-radius: 8px;
  font-size: 14px;
  margin: 12px 0;
  border-left: 4px solid #e53935;
}

/* ============================================================
   SEKCJE FORMULARZA
   ============================================================ */

/*
 * SEKCJE — zastępujemy fieldset+legend zwykłym div+div
 * żeby uniknąć wojen ze stylami motywu Bricks na natywnych elementach
 */
#daw-formularz-wrapper fieldset.daw-sekcja {
  background: #fff !important;
  border: 1px solid #e0e0e0 !important;
  border-top: none !important;        /* chowamy górną ramkę — legend ją "przerywa" */
  border-radius: 8px;
  padding: 28px 32px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  position: relative;
  display: block !important;
}

/* Legend — pełny reset + wyciągamy poza domyślny flow fieldset */
#daw-formularz-wrapper legend.daw-sekcja-tytul {
  /* pozycja — wyrównaj z fieldsetem */
  float: left !important;             /* float left wymusza pełną szerokość w FF/Chrome */
  width: 100% !important;
  /* reset wizualny */
  display: block !important;
  background: #fff !important;
  background-color: #fff !important;
  /* typografia */
  font-family: inherit !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  color: #1a1a2e !important;
  text-decoration: none !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  line-height: 1.4 !important;
  /* ramka motywu — reset */
  border: none !important;
  border-bottom: 2px solid #f48c03 !important;
  border-radius: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  /* odstępy */
  padding: 0 0 10px 0 !important;
  margin: 0 0 20px 0 !important;
}

/* Numer sekcji w kółku */
#daw-formularz-wrapper .daw-nr {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  vertical-align: middle !important;
  flex-shrink: 0;
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  background: #f48c03 !important;
  background-color: #f48c03 !important;
  color: #fff !important;
  border-radius: 50% !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  margin-right: 8px;
}

/* Tekst tytułu sekcji — blokujemy style linku z motywu */
#daw-formularz-wrapper legend.daw-sekcja-tytul,
#daw-formularz-wrapper legend.daw-sekcja-tytul * {
  color: #1a1a2e !important;
  text-decoration: none !important;
  cursor: default !important;
}

/* Po float:left na legend musimy clearować content fieldset */
#daw-formularz-wrapper fieldset.daw-sekcja::after {
  content: '';
  display: table;
  clear: both;
}

.daw-sekcja-opis {
  color: #777;
  font-size: 13px;
  margin: -10px 0 16px;
  font-style: italic;
}

/* ============================================================
   POLA FORMULARZA
   ============================================================ */

.daw-pole {
  margin-bottom: 18px;
}

.daw-pole-w {
  max-width: 220px;
}

.daw-pole label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: #222;
  font-size: 14px;
}

.daw-podpowiedz {
  font-weight: 400;
  color: #888;
  font-size: 13px;
  font-style: italic;
}

.daw-wymagane {
  color: #e53935;
  font-weight: 700;
}

/* Inputy, selecty, textarea */
.daw-pole input[type="text"],
.daw-pole input[type="number"],
.daw-pole input[type="date"],
.daw-pole input[type="time"],
.daw-pole input[type="email"],
.daw-pole select,
.daw-pole textarea,
.daw-lista-piosenek input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #ddd;
  border-radius: 7px;
  font-size: 15px;
  color: #333;
  background: #fafafa;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

.daw-pole input:focus,
.daw-pole select:focus,
.daw-pole textarea:focus,
.daw-lista-piosenek input:focus {
  outline: none;
  border-color: #f48c03;
  box-shadow: 0 0 0 3px rgba(244, 140, 3, 0.18);
  background: #fff;
}

.daw-pole input.daw-blad-pole,
.daw-lista-piosenek input.daw-blad-pole {
  border-color: #e53935 !important;
  background: #fff8f8;
}

.daw-pole textarea {
  resize: vertical;
  min-height: 80px;
}

/* ============================================================
   RADIO I CHECKBOX
   ============================================================ */

.daw-radio-grupa,
.daw-checkbox-grupa {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 4px;
  width: 100%;
}

.daw-radio-kolumna {
  flex-direction: column;
  gap: 6px;
}

.daw-radio-grupa label,
.daw-checkbox-grupa label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 400;
  cursor: pointer;
  font-size: 14px;
  color: #333;
  padding: 5px 8px;
  border-radius: 5px;
  transition: background 0.15s;
  max-width: 100%;          /* label nie może wyrosnąć poza rodzica */
  word-break: break-word;   /* długi tekst łamie się zamiast rozciągać */
  flex-shrink: 1;
}

.daw-radio-grupa label:hover,
.daw-checkbox-grupa label:hover {
  background: #fafaed;
}

.daw-radio-grupa input[type="radio"],
.daw-checkbox-grupa input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-width: 16px;           /* flex nie zgniataj inputa */
  accent-color: #f48c03;
  cursor: pointer;
  flex-shrink: 0;
}

/* Checkboxy w siatce — 2 kolumny na desktop, 1 na mobile */
.daw-checkbox-siatka {
  display: grid;
  grid-template-columns: repeat(2, 1fr);   /* stałe 2 kolumny — bez auto-fill z minmax */
  gap: 6px 12px;
  width: 100%;
}

/* ============================================================
   LISTA PIOSENEK (Must Have / Don't Play)
   ============================================================ */

.daw-lista-piosenek {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.daw-lista-piosenek input {
  background: #fafafa;
}

/* ============================================================
   OPCJE DODATKOWE (sekcja 9)
   ============================================================ */

.daw-checkbox-opcje {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.daw-opcja-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1.5px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.15s;
  font-weight: 400;
}

.daw-opcja-box:hover {
  border-color: #f48c03;
  background: #fffbe6;
}

.daw-opcja-box input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #f48c03;
  flex-shrink: 0;
  margin-top: 2px;
}

.daw-opcja-tresc {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.daw-opcja-tresc strong {
  font-size: 14px;
  color: #1a1a2e;
}

.daw-opcja-tresc em {
  font-size: 12px;
  color: #888;
  font-style: normal;
}

/* Badge z ceną przy opcji dodatkowej */
.daw-opcja-box {
  align-items: center;
}

.daw-opcja-cena {
  margin-left: auto;
  flex-shrink: 0;
  background: #1a1a2e;
  color: #f48c03;
  font-size: 13px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

/* Regulamin */
.daw-regulamin-wrapper {
  background: #f7f8ff;
  border: 1.5px solid #c5cae9;
  border-radius: 8px;
  padding: 18px 20px;
  margin: 4px 0 24px;
}

.daw-regulamin-label {
  display: flex !important;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-weight: 400 !important;
  font-size: 14px;
  color: #333;
  line-height: 1.5;
}

.daw-regulamin-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  accent-color: #f48c03;
  margin-top: 2px;
  flex-shrink: 0;
}

.daw-regulamin-label a {
  color: #1a1a2e;
  text-decoration: underline;
}

.daw-regulamin-label.daw-regulamin-error {
  border-color: #e53935;
  background: #fff8f8;
}

/* Pole email */
.daw-pole-email {
  background: #f7f8ff;
  border: 1.5px dashed #b0b8e0;
  border-radius: 8px;
  padding: 16px;
  margin-top: 6px;
}

/* ============================================================
   DWUKOLUMNOWY UKŁAD
   ============================================================ */

.daw-dwie-kolumny {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: 100%;
  min-width: 0;
}

/* Komórki gridu nie mogą wyrosnąć ponad kontener */
.daw-dwie-kolumny > * {
  min-width: 0;
  overflow: hidden;
}

/* ============================================================
   PRZYCISK SUBMIT
   ============================================================ */

.daw-submit-wrapper {
  text-align: center;
  margin: 32px 0 16px;
}

#daw-submit-btn {
  display: inline-block;
  padding: 18px 56px;
  background: linear-gradient(135deg, #f48c03, #b8960b);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(244, 140, 3, 0.4);
}

#daw-submit-btn:hover:not(:disabled) {
  opacity: 0.92;
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(244, 140, 3, 0.5);
}

#daw-submit-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.daw-submit-info {
  margin-top: 12px;
  font-size: 13px;
  color: #888;
}

/* ============================================================
   RESPONSYWNOŚĆ — TELEFON
   ============================================================ */

@media (max-width: 700px) {
  /* Dwukolumnowe gridy → jedna kolumna */
  .daw-dwie-kolumny {
    grid-template-columns: 1fr;
  }

  /* Siatka checkboxów → jedna kolumna */
  .daw-checkbox-siatka {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  #daw-haslo-wrapper {
    margin: 20px 12px;
    padding: 30px 20px;
  }

  .daw-naglowek {
    padding: 22px 18px;
  }

  .daw-naglowek h1 {
    font-size: 20px;
  }

  #daw-formularz-wrapper fieldset.daw-sekcja {
    padding: 20px 14px !important;
  }

  /* Radio/checkbox labels — mniejszy padding na ciasnych ekranach */
  .daw-radio-grupa label,
  .daw-checkbox-grupa label {
    padding: 5px 4px;
    font-size: 13px;
  }

  #daw-submit-btn {
    padding: 16px 32px;
    font-size: 16px;
    width: 100%;
  }

  .daw-pole-w {
    max-width: 100%;
  }
}

/* ============================================================
   STYLES FOR BIRTHDAY SURVEY (URODZINY) - dau- IDs
   ============================================================ */

/* EKRAN HASŁA — URODZINY */
#dau-haslo-wrapper {
  max-width: 460px;
  margin: 48px auto;
  padding: 44px 40px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  text-align: center;
  font-family: 'Segoe UI', Tahoma, Geneva, sans-serif;
}

#dau-haslo-blad {
  background: #ffebee;
  color: #c62828;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 14px;
  text-align: left;
}

#dau-haslo-input {
  width: 100%;
  padding: 13px 16px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.2s;
  margin-bottom: 12px;
  display: block;
}

#dau-haslo-input:focus {
  outline: none;
  border-color: #f48c03;
  box-shadow: 0 0 0 3px rgba(244, 140, 3, 0.2);
}

#dau-haslo-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #f48c03, #b8960b);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: opacity 0.2s, transform 0.15s;
}

#dau-haslo-btn:hover:not(:disabled) {
  opacity: 0.92;
  transform: translateY(-1px);
}

#dau-haslo-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* FORMULARZ — URODZINY */
#dau-formularz-wrapper {
  max-width: 800px;
  margin: 32px auto;
  padding: 32px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  font-family: 'Segoe UI', Tahoma, Geneva, sans-serif;
  overflow-x: hidden;
}

#dau-formularz-wrapper *,
#dau-haslo-wrapper * {
  box-sizing: border-box;
  min-width: 0;
}

#dau-sukces {
  background: #e8f5e8;
  color: #2e7d32;
  padding: 16px 20px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 24px;
  text-align: center;
  border: 1px solid #c8e6c9;
}

#dau-formularz-blad {
  background: #ffebee;
  color: #c62828;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 16px;
  text-align: left;
}

#dau-submit-btn {
  padding: 16px 32px;
  background: linear-gradient(135deg, #f48c03, #b8960b);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: opacity 0.2s, transform 0.15s;
  display: inline-block;
}

#dau-submit-btn:hover:not(:disabled) {
  opacity: 0.92;
  transform: translateY(-1px);
}

#dau-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Wrapper dla ukrywania/pokazywania pól */
#dau-dzieci-ile-wrapper,
#dau-tort-szczegoly-wrapper,
#dau-tort-muzyka-wrapper,
#dau-zabawy-rodzaje-wrapper {
  margin-top: 12px;
}

/* ============================================================
   PRINT — ukryj belkę WP admina, drukuj tylko treść
   ============================================================ */

@media print {
  /* Lewe menu, pasek górny, stopka WP */
  #adminmenuwrap,
  #adminmenuback,
  #wpadminbar,
  #wpfooter,
  #screen-meta,
  #screen-meta-links,
  .update-nag,
  .notice,
  .wp-pointer,
  .page-title-action,
  .subsubsub,
  .tablenav,
  .daw-submit-wrapper,
  button[onclick*="window.print"] {
    display: none !important;
  }

  /* Cofnij wcięcie treści (WP domyślnie dodaje margin-left na #wpcontent) */
  #wpcontent,
  #wpbody-content {
    margin-left: 0 !important;
    padding-left: 0 !important;
    float: none !important;
    width: 100% !important;
  }

  #wpwrap {
    overflow: visible !important;
  }

  /* Usuń margin-top spowodowany wpadminbarem */
  html.wp-toolbar {
    padding-top: 0 !important;
  }

  body {
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }
}

/* Mobile styles dla urodzin */
@media (max-width: 768px) {
  #dau-haslo-wrapper {
    margin: 24px 16px;
    padding: 32px 24px;
  }

  #dau-formularz-wrapper {
    margin: 16px;
    padding: 24px 16px;
  }

  #dau-submit-btn {
    padding: 16px 32px;
    font-size: 16px;
    width: 100%;
  }
}
