/**
 * eMotion Dance Academy — brand styling for the ActiveNow signup table.
 *
 * Overrides the default ActiveNow blue theme (#2F69FD) with the site palette
 * defined in the Elementor kit:
 *   primary  #CAAB89  (beige/gold — buttons)
 *   hover    #E6085D  (magenta — hover / focus)
 *   pink     #EC3AA2  (accents)
 *   text     #54595F / #7A7A7A
 *
 * Scoped to #activenow-table-container so nothing else on the site is affected.
 * The ActiveNow loader sets that id on .activenow-table-container at runtime;
 * both selectors are kept so styling also applies before the script runs.
 */

.activenow-table-container,
#activenow-table-container {
  --emo-primary: #caab89;
  --emo-primary-dark: #b8946d;
  --emo-accent: #e6085d;
  --emo-pink: #ec3aa2;
  --emo-ink: #2e3338;
  --emo-muted: #7a7a7a;
  --emo-border: #ece7e1;
  --emo-surface: #ffffff;

  max-width: 1180px;
  margin-inline: auto;
  font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* the placeholder shown until ActiveNow replaces the container contents */
.emotion-activenow-loading {
  display: flex;
  justify-content: center;
  padding: 48px 0;
}

/* ---------------------------------------------------------------- rows --- */

#activenow-table-container .activenow-table-grid {
  row-gap: 14px;
}

#activenow-table-container .activenow-table-row {
  position: relative;
  padding: 20px 24px;
  background-color: var(--emo-surface);
  border: 1px solid var(--emo-border);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(46, 51, 56, 0.04);
  transition: box-shadow 0.22s ease, transform 0.22s ease, border-color 0.22s ease;
}

#activenow-table-container .activenow-table-row:hover {
  border-color: rgba(202, 171, 137, 0.55);
  box-shadow: 0 10px 26px -12px rgba(46, 51, 56, 0.28);
  transform: translateY(-2px);
}

/* the coloured discipline strip on the left edge of every row */
#activenow-table-container .activenow-table-color-strip-desktop {
  border-radius: 999px;
  width: 4px;
}

/* ------------------------------------------------------------ typography --- */

#activenow-table-container .activenow-table-event-hour {
  color: var(--emo-ink);
  font-weight: 700;
  letter-spacing: -0.01em;
}

#activenow-table-container .activenow-table-event-day,
#activenow-table-container .activenow-table-event-dot {
  color: var(--emo-muted);
  font-weight: 500;
}

#activenow-table-container .activenow-table-name {
  color: var(--emo-ink);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.35;
}

#activenow-table-container .activenow-table-duration-desktop,
#activenow-table-container .activenow-table-duration-mobile,
#activenow-table-container .activenow-table-proficiency-name,
#activenow-table-container .activenow-table-venue-name {
  color: var(--emo-muted);
}

/* ------------------------------------------------------------- signup CTA --- */

#activenow-table-container .activenow-table-signup {
  background-color: var(--emo-primary);
  border-radius: 999px;
  padding: 13px 26px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  box-shadow: 0 6px 16px -8px rgba(202, 171, 137, 0.9);
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}

#activenow-table-container .activenow-table-signup:hover {
  background-color: var(--emo-accent);
  box-shadow: 0 8px 20px -8px rgba(230, 8, 93, 0.75);
}

#activenow-table-container .activenow-table-signup:active {
  transform: translateY(1px);
}

#activenow-table-container .activenow-table-signup:focus-visible {
  outline: 2px solid var(--emo-accent);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------- filters --- */

#activenow-table-container .filters {
  gap: 12px;
  margin-bottom: 20px;
}

#activenow-table-container .filters p {
  color: var(--emo-muted);
  letter-spacing: 0.05em;
}

#activenow-table-container .filter-component-select {
  border-radius: 999px;
  border: 1px solid var(--emo-border);
  background-color: #fbf9f7;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

#activenow-table-container .filter-component-select:hover {
  border-color: var(--emo-primary);
  background-color: #fff;
}

#activenow-table-container .filter-component:has(.filter-component-options.open) .filter-component-select {
  border-color: var(--emo-accent);
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(230, 8, 93, 0.1);
}

#activenow-table-container .filter-component-label {
  color: var(--emo-ink);
}

#activenow-table-container .filter-component-options {
  border-radius: 14px;
  border: 1px solid var(--emo-border);
  box-shadow: 0 18px 40px -18px rgba(46, 51, 56, 0.35);
  overflow: hidden;
}

#activenow-table-container .filter-component-counter,
#activenow-table-container .filters-button .filter-counter {
  background-color: rgba(236, 58, 162, 0.12);
  color: var(--emo-accent);
}

#activenow-table-container .filters-button {
  font-family: inherit;
  border-radius: 999px;
  border-color: var(--emo-primary);
  color: var(--emo-primary-dark);
  letter-spacing: 0.05em;
}

#activenow-table-container .filters-button:hover {
  background-color: #fbf6f1;
  border-color: var(--emo-accent);
  color: var(--emo-accent);
}

#activenow-table-container .filters-button .svg-icon {
  background-color: currentColor;
}

/* filter chips shown under the filter bar */
#activenow-table-container .filter-badge {
  border-radius: 999px;
  background-color: #fbf6f1;
  border: 1px solid var(--emo-border);
  color: var(--emo-ink);
}

#activenow-table-container .clear-filters-button,
#activenow-table-container .clear-filters-desktop-button {
  color: var(--emo-accent);
}

/* checkboxes inside the filter dropdowns */
#activenow-table-container .filter-component-options,
#activenow-table-container .filter-checkbox {
  accent-color: var(--emo-accent);
}

#activenow-table-container .filter-component-option:hover,
#activenow-table-container .filter-component-options label:hover {
  background-color: #fbf6f1;
}

/* ------------------------------------------------------------ empty state --- */

#activenow-table-container .activenow-no-events-found,
#activenow-table-container .activenow-no-events-found-with-filters {
  padding: 32px 24px;
  border: 1px dashed var(--emo-border);
  border-radius: 16px;
  background-color: #fbf9f7;
  color: var(--emo-muted);
  text-align: center;
}

/* ------------------------------------------------------------------ modal --- */

.modal__container {
  border-radius: 18px !important;
}

.modal__title {
  font-family: "Roboto", sans-serif;
  color: var(--emo-ink, #2e3338);
  font-weight: 600;
}

/* ------------------------------------------------------------- responsive --- */

@media (max-width: 768px) {
  #activenow-table-container .activenow-table-row {
    padding: 18px;
    border-radius: 14px;
  }

  #activenow-table-container .activenow-table-row:hover {
    transform: none;
  }

  #activenow-table-container .activenow-table-signup {
    padding: 14px 20px;
  }
}

/* ================================================================
   Okno zapisu ActiveNow (MicroModal)

   ActiveNow przenosi modal do #signup-modal-holder pod <body>, więc
   jest poza #activenow-table-container i wymaga własnych selektorów.
   Domyślnie pola idą jedno pod drugim na całą szerokość — poniżej
   układ dwukolumnowy i wygląd zgodny z resztą serwisu.
   ================================================================ */

#signup-modal {
  --emo-primary: #caab89;
  --emo-primary-dark: #b8946d;
  --emo-accent: #e6085d;
  --emo-ink: #2e3338;
  --emo-muted: #7a7a7a;
  --emo-border: #e2dbd3;
  --emo-field: #fbf9f7;
}

#signup-modal .modal__container {
  max-width: 900px;
  border-radius: 18px;
  padding-bottom: 8px;
}

#signup-modal .modal__title {
  font-family: "Roboto", sans-serif;
  font-weight: 600;
  color: var(--emo-ink);
}

/* --------------------------------------------------------- układ pól --- */

#signup-modal .activenow-form-client-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
  align-items: start;
}

/* elementy pełnej szerokości: opis zajęć, sekcja rodzica, zgody, przycisk */
#signup-modal .activenow-form-client-details > div:has(.activenow-form-class-description),
#signup-modal .activenow-form-client-details > div:has(> select),
#signup-modal .activenow-form-client-details > .js-activenow-parent-section,
#signup-modal .activenow-form-client-details > .activenow-checkbox-field,
#signup-modal .activenow-form-client-details > .activenow-optional-checkbox-field,
#signup-modal .activenow-form-client-details > .activenow-form-field:has(> input[type="checkbox"]),
#signup-modal .activenow-form-client-details > button {
  grid-column: 1 / -1;
}

/* pola rodzica — własna para kolumn wewnątrz bloku pełnej szerokości */
#signup-modal .js-activenow-parent-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
}

/* pusty kontener, który ActiveNow zostawia po nieużywanym polu */
#signup-modal .activenow-form-field:empty {
  display: none;
}

@supports not selector(:has(*)) {
  #signup-modal .activenow-form-client-details,
  #signup-modal .js-activenow-parent-section {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 780px) {
  #signup-modal .activenow-form-client-details,
  #signup-modal .js-activenow-parent-section {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ------------------------------------------------------------- pola --- */

#signup-modal .activenow-form input[type="text"],
#signup-modal .activenow-form input[type="email"],
#signup-modal .activenow-form input[type="tel"],
#signup-modal .activenow-form input[type="number"],
#signup-modal .activenow-form select,
#signup-modal .activenow-form textarea {
  box-sizing: border-box;
  width: 100%;
  padding: 12px 14px;
  font-family: "Roboto", sans-serif;
  font-size: 15px;
  color: var(--emo-ink);
  background-color: var(--emo-field);
  border: 1px solid var(--emo-border);
  border-radius: 10px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

#signup-modal .activenow-form input:hover,
#signup-modal .activenow-form select:hover,
#signup-modal .activenow-form textarea:hover {
  border-color: var(--emo-primary);
}

#signup-modal .activenow-form input:focus,
#signup-modal .activenow-form select:focus,
#signup-modal .activenow-form textarea:focus {
  outline: none;
  background-color: #fff;
  border-color: var(--emo-accent);
  box-shadow: 0 0 0 3px rgba(230, 8, 93, 0.12);
}

#signup-modal .activenow-form ::placeholder {
  color: #9a9a9a;
  opacity: 1;
}

/* ------------------------------------------------------------ zgody --- */

#signup-modal .activenow-checkbox-field,
#signup-modal .activenow-optional-checkbox-field,
#signup-modal .activenow-form-client-details > .activenow-form-field:has(> input[type="checkbox"]) {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 10px;
  align-items: start;
  padding: 12px 14px;
  background-color: var(--emo-field);
  border: 1px solid var(--emo-border);
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--emo-muted);
}

#signup-modal .activenow-checkbox-field .activenow-error,
#signup-modal .activenow-optional-checkbox-field .activenow-error {
  grid-column: 1 / -1;
}

/* min-width/flex blokują ściskanie: w kolumnie "auto" przeglądarka spłaszczała
   checkboxy stojące obok wielolinijkowej zgody (wychodziło 13 px zamiast 18 px,
   przez co pola wyglądały na różnej wielkości). */
#signup-modal .activenow-form input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  flex: 0 0 auto;
  justify-self: start;
  align-self: start;
  margin: 1px 0 0;
  accent-color: var(--emo-accent);
  cursor: pointer;
}

#signup-modal .activenow-form label {
  margin: 0;
  font-weight: 400;
  color: inherit;
  cursor: pointer;
}

#signup-modal .activenow-form a {
  color: var(--emo-accent);
}

/* --------------------------------------------------------- przycisk --- */

#signup-modal .activenow-form button {
  justify-self: start;
  min-width: 220px;
  margin-top: 6px;
  padding: 14px 34px;
  font-family: "Roboto", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background-color: var(--emo-primary);
  border: none;
  border-radius: 999px;
  box-shadow: 0 6px 16px -8px rgba(202, 171, 137, 0.9);
  cursor: pointer;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}

#signup-modal .activenow-form button:hover {
  background-color: var(--emo-accent);
  box-shadow: 0 8px 20px -8px rgba(230, 8, 93, 0.75);
}

#signup-modal .activenow-form button:active {
  transform: translateY(1px);
}

#signup-modal .activenow-form button:focus-visible {
  outline: 2px solid var(--emo-accent);
  outline-offset: 2px;
}

@media (max-width: 780px) {
  #signup-modal .activenow-form button {
    width: 100%;
  }
}

/* ------------------------------------------------------ walidacja --- */

#signup-modal .activenow-error {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--emo-accent);
}

#signup-modal .activenow-error:not(.soft-d-none) + input {
  border-color: var(--emo-accent);
  background-color: #fff6f9;
}

/* ------------------------------------------------- opis zajęć w oknie --- */

#signup-modal .activenow-form-class-description {
  padding: 16px 18px;
  background-color: var(--emo-field);
  border: 1px solid var(--emo-border);
  border-radius: 14px;
}

#signup-modal .activenow-class-title {
  color: var(--emo-ink);
  font-weight: 600;
}

#signup-modal .activenow-class-label {
  color: var(--emo-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 11.5px;
}
