/* ------------------------------------------------------------------
   1. GLOBAL LAYOUT & TYPOGRAPHY
   ------------------------------------------------------------------ */

.ae-events {
  max-width: var(--content-width, 1200px);
  margin: 0 auto;
}

/* Advisor Tool Title + Heading Styles */
.ae-advisor-tool .ae-page-title,
.ae-advisor-tool label,
.ae-registration h2,
.ae-calendar-links h3 {
  color: #003366;
  font-family: Montserrat, Arial, sans-serif;
}

/* Body font for form fields & Meta */
.ae-advisor-tool,
.ae-form input,
.ae-form textarea,
.ae-form select,
.ae-form button,
.ae-event-meta {
  font-family: Helvetica, Arial, sans-serif;
}

/* ------------------------------------------------------------------
   2. EVENTS LIST VIEW (/events page)
   ------------------------------------------------------------------ */

.ae-event {
  display: grid;
  grid-template-columns: 280px 1fr; /* Fixed width for card, rest for content */
  gap: 40px;
  padding: 40px 0;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  align-items: start;
}

.ae-event-title {
  margin-top: 15px !important;
  margin-bottom: 10px;
}

.ae-event-title a {
  text-decoration: none;
  color: #102d53;
}

.ae-event-meta-top {
  color: #666;
  margin-bottom: 10px;
  font-size: 0.95em;
}

/* Location Link Hover Effect */
.ae-meta-item a:hover {
  color: #032f60 !important;
  border-bottom-color: #032f60 !important;
}

/* Mobile Stack for List View */
@media (max-width: 768px) {
  .ae-event {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------------------------------------------
   3. HOST CARD STYLES
   ------------------------------------------------------------------ */

.ae-host-card {
  width: 100%;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  background: #f0f0f0;
  aspect-ratio: 1 / 1;
}

.ae-card-image {
  width: 100%;
  height: 100%;
  position: absolute; 
  top: 0;
  left: 0;
  background-size: cover;
  background-position: center;
  z-index: 1;
}

.ae-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(16, 45, 83, 0.95) 0%, rgba(16, 45, 83, 0.8) 50%, rgba(16, 45, 83, 0) 100%);
  padding: 70px 20px 20px;
  color: #fff;
  font-family: Montserrat, sans-serif;
  z-index: 2;
}

.ae-card-name {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 4px;
}

.ae-card-title {
  font-size: 13px;
  opacity: 0.9;
  font-weight: 400;
  margin-bottom: 12px;
}

/* Social Icons */
.ae-card-icons {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.ae-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.4);
  color: #fff;
  text-decoration: none;
  transition: 0.2s;
}

.ae-icon:hover {
  background: #fff;
  color: #102d53;
  border-color: #fff;
}

.ae-icon .dashicons {
  font-size: 16px;
  width: 16px;
  height: 16px;
}

/* Fallback Date Box (if no host) */
.ae-date-box {
  background: #f4f4f4;
  padding: 20px;
  text-align: center;
  border-radius: 8px;
  font-weight: bold;
  color: #333;
}

/* Office Image Only (No overlay) */
.ae-host-image-only img {
  width: 100%;
  border-radius: 12px;
  display: block;
}


/* ------------------------------------------------------------------
   4. SINGLE EVENT PAGE LAYOUT
   ------------------------------------------------------------------ */

.ae-single-wrapper {
  display: grid;
  grid-template-columns: 300px 1fr; /* Fixed sidebar, flexible content */
  gap: 50px;
  align-items: start;
  margin-top: 30px;
}

/* Sidebar (Host Card) */
.ae-single-sidebar {
  position: sticky;
  top: 40px; 
}

.ae-single-sidebar .ae-host-card {
  max-width: 100%; 
  width: 100%;
}

/* Main Content */
.ae-single-main {
  min-width: 0;
}

/* Divi Compatibility */
.et_pb_module .ae-single-wrapper {
   width: 100%;
   max-width: 100%;
}

/* Responsive Single Page */
@media (max-width: 900px) {
  .ae-single-wrapper {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .ae-single-sidebar {
    position: static;
    max-width: 350px;
    margin-bottom: 20px;
  }
}

/* Single Page Meta */
.ae-event-meta {
  margin: 20px 0 30px;
}
.ae-event-meta-row {
  margin-bottom: 6px;
  font-size: 16px;
}
.ae-event-meta strong {
  color: #003366;
  font-family: Montserrat, Arial, sans-serif;
}

/* Force Divi to show shortcode-rendered meta */
.et_pb_text_inner .ae-event-meta {
  display: block !important;
  height: auto !important;
  min-height: 1px !important;
  overflow: visible !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* ------------------------------------------------------------------
   5. FORMS (Registration & Advisor Tool)
   ------------------------------------------------------------------ */

.ae-form-row {
  margin-bottom: 22px;
}
.ae-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
}

/* Inputs */
.ae-form input,
.ae-form textarea,
.ae-form select {
  width: 100%;
  box-sizing: border-box;
  padding: 16px;
  font-size: 16px;
  line-height: 1.2;
  border-radius: 6px;
  border: 1px solid #ccc;
  background: #fff;
  min-height: 54px;
}

/* Checkboxes and radios must escape the generic .ae-form input sizing above,
   which sets width:100% and min-height:54px and turns a checkbox into a
   full-width block. Selector is (0,2,1) so it outranks .ae-form input (0,1,1). */
.ae-form input[type="checkbox"],
.ae-form input[type="radio"] {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  margin: 0;
  flex: 0 0 auto;
  accent-color: #032f60;
}

.ae-form textarea {
  min-height: 180px;
}

/* WYSIWYG Editor Container */
.ae-advisor-form .wp-editor-wrap {
  border: 1px solid #ccc;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

/* Fix WYSIWYG Toolbar Buttons (Prevent stretching) */
.ae-form .quicktags-toolbar input[type="button"] {
  width: auto !important;
  min-height: 0 !important;
  display: inline-block !important;
  margin: 2px !important;
  padding: 4px 8px !important;
  font-size: 13px !important;
  line-height: normal !important;
  background: #f7f7f7 !important;
  border: 1px solid #ccc !important;
  color: #555 !important;
  box-shadow: none !important;
}

.ae-form .quicktags-toolbar input[type="button"]:hover {
  background: #fafafa !important;
  border-color: #999 !important;
  color: #23282d !important;
}

/* ------------------------------------------------------------------
   WordPress editor chrome
   ------------------------------------------------------------------
   The branded `.ae-form button` rule above is all !important, so every button
   WordPress renders inside wp_editor() inherits brand blue, uppercase and 24px
   padding. TinyMCE puts a real <button> inside each .mce-btn wrapper and the
   Visual/Text tabs are .wp-switch-editor buttons, so both need handing back to
   the editor's own styling. */
.ae-form .mce-container button,
.ae-form .mce-container-body button,
.ae-form .mce-toolbar button,
.ae-form .mce-btn button,
.ae-form .mce-menu-item button,
.ae-form .mce-close {
  background: none !important;
  background-color: transparent !important;
  color: inherit !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 4px 6px !important;
  margin: 0 !important;
  min-height: 0 !important;
  width: auto !important;
  font-size: inherit !important;
  font-weight: 400 !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  line-height: normal !important;
  box-shadow: none !important;
  transition: none !important;
}

.ae-form .mce-container button:hover,
.ae-form .mce-toolbar button:hover,
.ae-form .mce-btn button:hover {
  background-color: transparent !important;
  color: inherit !important;
}

/* Visual / Text tabs */
.ae-form .wp-switch-editor {
  background-color: #f0f0f1 !important;
  color: #50575e !important;
  border: 1px solid #dcdcde !important;
  border-bottom-color: transparent !important;
  border-radius: 4px 4px 0 0 !important;
  padding: 5px 11px !important;
  margin: 5px 0 0 5px !important;
  min-height: 0 !important;
  width: auto !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  line-height: 1.6 !important;
  box-shadow: none !important;
}

.ae-form .wp-switch-editor:hover {
  background-color: #fff !important;
  color: #1d2327 !important;
}

.ae-form .tmce-active .switch-tmce,
.ae-form .html-active .switch-html {
  background-color: #fff !important;
  color: #1d2327 !important;
  border-bottom-color: #fff !important;
}

.ae-form .wp-editor-tools {
  background: #f6f7f7;
  border-bottom: 1px solid #dcdcde;
  padding-bottom: 0;
}

.ae-form .wp-editor-tabs {
  float: right;
}

/* Registration Form Spacing */
.ae-form-title,
.ae-registration h2 {
  margin-bottom: 25px !important;
  padding-bottom: 10px;
}

/* ------------------------------------------------------------------
   6. BRANDED BUTTONS
   ------------------------------------------------------------------ */

.ae-form button, 
.ae-map-btn {
  background-color: #032f60 !important; /* Brand Blue */
  color: #ffffff !important;
  font-family: inherit !important;
  font-weight: 600 !important;
  border: none !important;
  border-radius: 4px !important;
  padding: 12px 24px !important;
  cursor: pointer !important;
  transition: background-color 0.3s ease !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 14px !important;
}

.ae-form button:hover, 
.ae-map-btn:hover {
  background-color: #d6b556 !important; /* Gold Hover */
  color: #ffffff !important;
}

/* Divi Override */
.et_pb_module .ae-form button {
  margin-top: 10px;
}

/* ------------------------------------------------------------------
   7. CALENDAR & THANK YOU PAGE
   ------------------------------------------------------------------ */

.ae-calendar-links {
  margin-top: 40px;
}
.ae-calendar-table {
  width: 100%;
  border-collapse: collapse;
}
.ae-calendar-table td {
  text-align: center;
  padding: 20px;
}
.ae-calendar-table a {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  font-weight: 600;
}
.ae-calendar-table img {
  width: 48px;
  height: 48px;
  margin-bottom: 10px;
}
.ae-calendar-table span {
  display: block;
}

@media (max-width: 768px) {
  .ae-calendar-table tr {
    display: flex;
    flex-direction: column;
  }
}

/* --- NO HOST PLACEHOLDER IMAGE --- */
.ae-no-host-image {
    width: 100%;
    max-width: 448px; /* Restrict width as requested */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15); /* Match host card shadow */
}

.ae-no-host-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}


/* Base style for the icon circles */
.ae-card-icons .ae-icon {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid #fff;
    border-radius: 50%;
    margin-right: 8px;
    text-decoration: none !important;
    font-size: 0 !important; /* This hides the CleanTalk text */
    vertical-align: middle;
}

/* Email Icon */
.ae-card-icons .ae-icon.email::before {
    content: "\f466";
    font-family: "dashicons" !important;
    font-size: 18px; /* Icon size */
    color: #fff;
}

/* Phone Icon */
.ae-card-icons .ae-icon.phone::before {
    content: "\f525";
    font-family: "dashicons" !important;
    font-size: 18px; /* Icon size */
    color: #fff;
}

/* Invert icon color on hover */
.ae-card-icons .ae-icon:hover::before {
    color: #222 !important; /* This makes the icon dark when the circle turns white */
}

/* Ensure the transition is smooth */
.ae-card-icons .ae-icon::before {
    transition: color 0.3s ease;
}

#ae-register { scroll-margin-top: 120px; }

.ae-event-register-btn {
  display: inline-block;
  margin-top: 14px;
  background: #032f60;
  color: #fff;
  padding: 12px 26px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 700;
  font-family: Montserrat, Arial, sans-serif;
  line-height: 1;
}

.ae-event-register-btn:hover {
  color: #fff;
  filter: brightness(0.92);
}

.ae-event-register-btn {
  display: inline-block;
  margin-top: 14px;
  background: #032f60;
  color: #fff;
  padding: 12px 26px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 700;
  font-family: Montserrat, Arial, sans-serif;
  line-height: 1;
}

.ae-event-register-btn:hover {
  color: #fff;
  filter: brightness(0.92);
}

.ae-event-register-btn--closed {
  background: #d3d7de;
  color: #6b7280;
  cursor: not-allowed;
  pointer-events: none;
}

#ae-register { scroll-margin-top: 120px; }

.ae-form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
}

.ae-dashboard-btn {
  background: #032f60;
  color: #fff;
  padding: 10px 18px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-family: Montserrat, Arial, sans-serif;
  line-height: 1;
}

.ae-dashboard-btn:hover {
  color: #fff;
  filter: brightness(0.92);
}
.ae-dashboard-card {
  border: 1px solid #e3e6ea;
  border-radius: 10px;
  padding: 22px 24px;
  margin-bottom: 28px;
  background: #fff;
}

.ae-card-head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
}

.ae-card-title {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
}

.ae-card-title h2 {
  margin: 0;
  font-size: 1.35em;
  line-height: 1.25;
}

.ae-card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  flex: 0 0 auto;
}

.ae-dashboard-btn--ghost {
  background: #fff;
  color: #032f60;
  border: 1px solid #032f60;
}

.ae-dashboard-btn--ghost:hover {
  background: #f2f6fb;
  color: #032f60;
}

.ae-badge {
  display: inline-block;
  font-size: 0.72em;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.ae-badge.is-open { background: #e7f6ee; color: #0d6b3f; }
.ae-badge.is-full { background: #fff4e5; color: #92400e; }
.ae-badge.is-past { background: #eef0f2; color: #55606a; }

/* Meta tiles: label above value, so a long date never collides with its label */
.ae-dashboard-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 14px 18px;
  padding: 16px 0 18px;
  border-top: 1px solid #eef0f2;
  border-bottom: 1px solid #eef0f2;
}

.ae-meta-tile {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.ae-meta-label {
  font-size: 0.75em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7580;
}

.ae-meta-value {
  font-size: 1em;
  line-height: 1.35;
}

.ae-meta-strong {
  font-weight: 700;
  color: #032f60;
}

/* Session schedule */
.ae-session-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.ae-session-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  justify-content: space-between;
  padding: 8px 12px;
  background: #f7f9fb;
  border-radius: 6px;
  font-size: 0.95em;
}

.ae-session-list li.is-done {
  opacity: 0.55;
}

.ae-session-count {
  font-weight: 600;
  color: #032f60;
  white-space: nowrap;
}

.ae-session-note {
  margin: 8px 0 0;
  font-size: 0.85em;
  color: #6b7580;
}

.ae-dashboard-attendees-title {
  margin: 26px 0 14px;
}

.ae-dashboard-attendees-title .ae-count {
  font-weight: 400;
  color: #6b7580;
}

.ae-pill {
  display: inline-block;
  font-size: 0.8em;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

.ae-pill.is-yes { background: #e7f6ee; color: #0d6b3f; }
.ae-pill.is-no  { background: #fdeaea; color: #a11c1c; }

.ae-remove-form { display: inline; }

.ae-dashboard-table .ae-remove-btn,
.ae-remove-btn {
  background-color: #fff !important;
  color: #a11c1c !important;
  border: 1px solid #e3b7b7 !important;
  padding: 7px 13px !important;
  border-radius: 6px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  text-transform: none;
  cursor: pointer !important;
  white-space: nowrap;
}

.ae-dashboard-table .ae-remove-btn:hover,
.ae-remove-btn:hover {
  background-color: #fdeaea !important;
  color: #a11c1c !important;
}

/* Roster collapsing. The row limit comes from the ae_roster_visible_rows PHP
   filter, so the script marks individual rows rather than the CSS hardcoding a
   position - nth-child() cannot read a custom property, and a hardcoded number
   here would silently disagree with a filtered one.
   (0,2,1) outranks the display rules in the container queries below, which add
   no specificity of their own. */
.ae-dashboard-table tr.ae-row-collapsed {
  display: none;
}

.ae-roster-more {
  margin-top: 14px;
  display: flex;
  justify-content: center;
}

.ae-roster-more[hidden] {
  display: none;
}

.ae-show-more {
  min-width: 220px;
}

/* ------------------------------------------------------------------
   REGISTRATION ROSTER
   ------------------------------------------------------------------
   The constraint here is the width of the CARD, not the viewport: the
   dashboard sits in a ~915px content column inside a much wider window, so a
   viewport media query cannot tell whether a nine-column table will fit.
   Container queries measure the actual available width instead.

   Default is the stacked card layout. The table is opt-in above 1080px of
   container width, so a browser without container-query support gets the
   layout that always reads correctly rather than a broken table.
   ------------------------------------------------------------------ */

.ae-dashboard-table-wrap {
  container-type: inline-size;
  container-name: ae-roster;
  width: 100%;
}

.ae-dashboard-table {
  width: 100%;
  border-collapse: collapse;
}

.ae-dashboard-table thead {
  display: none;
}

.ae-dashboard-table,
.ae-dashboard-table tbody,
.ae-dashboard-table tr,
.ae-dashboard-table td {
  display: block;
  width: auto;
}

.ae-dashboard-table tr {
  border: 1px solid #e3e6ea;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 12px;
}

.ae-dashboard-table tr.ae-not-attending {
  background: #fcfcfd;
}

.ae-dashboard-table tr.ae-not-attending td {
  color: #6b7580;
}

.ae-dashboard-table td {
  border: none;
  padding: 4px 0;
  display: grid;
  grid-template-columns: minmax(0, 130px) minmax(0, 1fr);
  gap: 3px 14px;
  align-items: start;
  overflow-wrap: anywhere;
}

.ae-dashboard-table td::before {
  content: attr(data-label);
  font-size: 0.75em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7580;
  padding-top: 2px;
}

.ae-dashboard-table .ae-col-name {
  font-weight: 700;
  font-size: 1.05em;
}

.ae-dashboard-table .ae-col-actions {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid #f0f2f4;
}

/* Cell contents are grid items in card mode and would otherwise stretch to the
   full track width - most visibly the Yes/No pill. */
.ae-dashboard-table td > * {
  justify-self: start;
}

/* Mid-width containers: two field columns instead of one long stack, which
   roughly halves the height of each registration. */
@container ae-roster (min-width: 620px) {
  .ae-dashboard-table tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 28px;
  }

  .ae-dashboard-table .ae-col-notes,
  .ae-dashboard-table .ae-col-actions {
    grid-column: 1 / -1;
  }
}

/* Narrow cards: label above value */
@container ae-roster (max-width: 480px) {
  .ae-dashboard-table td {
    grid-template-columns: minmax(0, 1fr);
    gap: 1px;
  }
}

/* Enough room for a real table */
@container ae-roster (min-width: 1080px) {
  .ae-dashboard-table {
    table-layout: auto;
  }

  /* Undo the two-column card grid from the 620px rule above */
  .ae-dashboard-table .ae-col-notes,
  .ae-dashboard-table .ae-col-actions {
    grid-column: auto;
  }

  .ae-dashboard-table thead {
    display: table-header-group;
  }

  .ae-dashboard-table tbody { display: table-row-group; }
  .ae-dashboard-table tr    { display: table-row; }
  .ae-dashboard-table td,
  .ae-dashboard-table th    { display: table-cell; }

  .ae-dashboard-table tr {
    border: none;
    border-radius: 0;
    padding: 0;
    margin: 0;
  }

  .ae-dashboard-table th,
  .ae-dashboard-table td {
    text-align: left;
    vertical-align: top;
    padding: 12px 14px 12px 0;
    border-top: 1px solid #eef0f2;
    grid-template-columns: none;
  }

  .ae-dashboard-table td::before {
    content: none;
  }

  .ae-dashboard-table thead th {
    border-top: none;
    padding-top: 0;
    padding-bottom: 10px;
    font-weight: 700;
    font-size: 0.78em;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7580;
    white-space: nowrap;
  }

  .ae-dashboard-table .ae-col-name      { width: 14%; font-size: 1em; }
  .ae-dashboard-table .ae-col-email     { width: 18%; }
  .ae-dashboard-table .ae-col-phone     { width: 11%; white-space: nowrap; }
  .ae-dashboard-table .ae-col-advisor   { width: 12%; }
  .ae-dashboard-table .ae-col-session   { width: 13%; }
  .ae-dashboard-table .ae-col-attending { width:  8%; }
  .ae-dashboard-table .ae-col-party     { width:  6%; }
  .ae-dashboard-table .ae-col-notes     { width: 18%; }

  .ae-dashboard-table .ae-col-actions {
    width: 100px;
    margin: 0;
    padding-top: 12px;
    border-top: 1px solid #eef0f2;
    white-space: nowrap;
  }
}

@media (max-width: 700px) {
  .ae-card-head {
    flex-direction: column;
  }

  .ae-dashboard-card {
    padding: 18px 16px;
  }
}

/* ------------------------------------------------------------------
   SESSION PICKER (create + edit forms)
   ------------------------------------------------------------------ */

.ae-sessions-fieldset {
  border: 1px solid #dfe3e8;
  border-radius: 8px;
  padding: 18px 20px;
  margin-bottom: 24px;
}

.ae-sessions-fieldset legend {
  font-weight: 700;
  padding: 0 8px;
}

.ae-session-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.ae-session-index {
  flex: 0 0 auto;
  width: 22px;
  font-weight: 700;
  color: #6b7580;
  font-size: 0.9em;
  text-align: right;
}

.ae-session-index:empty {
  display: none;
}

/* Override the 54px-tall full-width .ae-form input sizing for these compact rows */
.ae-form .ae-session-row input[type="date"],
.ae-form .ae-session-row input[type="time"] {
  min-height: 46px;
  padding: 10px 12px;
  font-size: 15px;
}

.ae-form .ae-session-row input[type="date"] { flex: 2 1 150px; width: auto; }
.ae-form .ae-session-row input[type="time"] { flex: 1 1 105px; width: auto; }

.ae-form .ae-remove-session,
.ae-remove-session {
  flex: 0 0 auto;
  background-color: #fff !important;
  color: #a11c1c !important;
  border: 1px solid #d1d5db !important;
  border-radius: 6px !important;
  width: 42px;
  height: 46px; /* matches the session row inputs so the row ends squarely */
  padding: 0 !important;
  font-size: 18px !important;
  line-height: 1;
  cursor: pointer !important;
}

.ae-form .ae-remove-session:hover,
.ae-remove-session:hover {
  background-color: #fdeaea !important;
  color: #a11c1c !important;
}

/* One shared control height so the buttons, selects and the "or repeat" label
   all sit on the same line rather than each finding its own baseline. */
.ae-session-controls {
  --ae-control-h: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #eef0f2;
}

.ae-session-controls > *,
.ae-repeat-group > * {
  margin: 0;
}

.ae-repeat-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.ae-repeat-label {
  display: inline-flex;
  align-items: center;
  height: var(--ae-control-h, 40px);
  color: #6b7580;
  font-size: 14px;
  white-space: nowrap;
}

.ae-form .ae-repeat-group select {
  width: auto;
  height: var(--ae-control-h, 40px);
  min-height: var(--ae-control-h, 40px);
  padding: 0 10px !important;
  font-size: 14px;
  line-height: normal;
  box-sizing: border-box;
}

/* The branded rule above is .ae-form button with !important throughout (it has
   to outrank Divi), so secondary buttons have to answer in kind or they render
   as primary brand-blue buttons with a gold hover. */
.ae-form .ae-secondary-btn,
.ae-secondary-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  height: var(--ae-control-h, 40px);
  min-height: var(--ae-control-h, 40px) !important;
  box-sizing: border-box;
  background-color: #f4f6f8 !important;
  color: #032f60 !important;
  border: 1px solid #d1d5db !important;
  border-radius: 6px !important;
  padding: 0 15px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1 !important;
  cursor: pointer !important;
}

.ae-form .ae-secondary-btn:hover:not(:disabled),
.ae-secondary-btn:hover:not(:disabled) {
  background-color: #e9eef4 !important;
  color: #032f60 !important;
}

.ae-form .ae-secondary-btn:disabled,
.ae-secondary-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed !important;
}

.ae-field-hint {
  font-size: 0.85em;
  color: #6b7580;
  margin: 10px 0 0;
  line-height: 1.5;
}

.ae-hint-error { color: #a11c1c; font-weight: 600; }
.ae-hint-ok    { color: #0d6b3f; font-weight: 600; }

.ae-checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  cursor: pointer;
}

@media (max-width: 600px) {
  .ae-session-row {
    flex-wrap: wrap;
  }

  .ae-session-controls {
    align-items: stretch;
  }
}

/* ------------------------------------------------------------------
   YEAR NAVIGATION (events listing archive)
   ------------------------------------------------------------------ */

.ae-year-nav {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.ae-year-nav-title {
  margin: 0 0 14px;
  font-size: 1em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7580;
}

/* Divi styles list items inside content areas (disc markers plus a left indent),
   and those selectors outrank a bare .ae-year-list, so the markers have to be
   removed explicitly from both the ul and its items. */
.ae-year-nav .ae-year-list,
.ae-year-nav .ae-year-list li {
  list-style: none !important;
  list-style-type: none !important;
  list-style-image: none !important;
  margin: 0 !important;
  padding: 0 !important;
  text-indent: 0 !important;
  background: none;
}

.ae-year-nav .ae-year-list li::marker {
  content: none;
}

.ae-year-nav .ae-year-list li::before {
  content: none !important;
  display: none !important;
}

.ae-year-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ae-year-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #fff;
  color: #032f60;
  font-weight: 600;
  font-size: 0.95em;
  text-decoration: none;
  line-height: 1;
}

a.ae-year-link:hover {
  background: #f2f6fb;
  border-color: #032f60;
  color: #032f60;
}

.ae-year-link.is-current {
  background: #032f60;
  border-color: #032f60;
  color: #fff;
  cursor: default;
}

.ae-year-count {
  display: inline-block;
  min-width: 20px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #eef1f5;
  color: #55606a;
  font-size: 0.78em;
  font-weight: 700;
  text-align: center;
}

.ae-year-link.is-current .ae-year-count {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

@media (max-width: 600px) {
  .ae-year-nav {
    margin-top: 32px;
  }
}

