/* ====== LAYOUT ====== */
.attendee-container { width: 100%; }

.attendee-row {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  align-items: flex-start;
  padding: 7px;
}

.attendee-row:nth-child(even):not(.header) { background-color: #f0f8ff; }
.attendee-row:nth-child(odd):not(.header)  { background-color: #f9f9f9; }

.cell { box-sizing: border-box; padding: 0 4px; }
.cell input,
.cell select { width: 100%; padding: 4px; box-sizing: border-box; }

.name, .email, .phone, .address { flex: 0 0 calc(100% / 6); } /* 1/6 each */

.reg-options {
  flex: 0 0 calc(100% / 3); /* 1/3 */
  display: flex;
  gap: 6px;
}
.reg-options .reg-dropdown { flex: 1; }
.reg-options .reg-summary {
  flex: 2;
  display: flex;
  align-items: center;
  gap: 6px;
}

.double-inputs { display: flex; gap: 6px; }
.double-inputs input,
.double-inputs select { flex: 1; min-width: 0; }

.header {
  font-weight: bold;
  background: #eee;
  padding: 7px;
}

/* ====== TEXT / UI UTILITIES ====== */
.red-star { color: red; }

.abr-tooltip,
.reg-summary span[title] {
  border-bottom: 1px dotted #555;
  cursor: help;
  display: inline-block;
  white-space: nowrap;
  font-size: 12px;
}

button {
  font-family: 'Open Sans', sans-serif;
  background-color: #0e5c92;
  color: white;
  padding: 12px 30px;
  margin: 20px 20px 0 0;
  border-radius: 4px;
  border: none;
}

/* ====== VALIDATION ====== */
input.invalid,
select.invalid,
textarea.invalid,
span.invalid,
.radio-group.invalid,
.dropdown-toggle.invalid {
  border: 2px solid red !important;
  transition: border-color 0.3s ease;
}

.attendee-row.invalid-row { border: 2px solid red; }

/* ====== MODAL ====== */
.modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  display: none;
  align-items: flex-start;
  justify-content: center;
  z-index: 999999;
  overflow-y: auto;         /* allows vertical scrolling */
  padding-top: 80px;        /* pushes content down below header */
  box-sizing: border-box;
}
.modal.active { display: flex; }

.modal-content {
  background: white;
  padding: 20px;
  border-radius: 8px;
  max-width: 600px;
  width: 100%;
  position: relative;
  margin-bottom: 40px;      /* extra space at bottom for scroll clearance */
}

.warning {
  color: red;
  font-size: 0.9em;
  margin-bottom: 10px;
}

body.modal-open .fusion-header-wrapper { pointer-events: none !important; }

/* ====== EXHIBIT MAP ====== */
.exhibit {
  cursor: pointer;
  stroke: #000;
  fill: #ccc;
}
.exhibit.selected { fill: orange !important; }
svg rect.exhibit { pointer-events: all; }
svg rect.exhibit:hover {
  fill: yellow !important;
  cursor: pointer;
}
#exhibit-map-container {
  display: none;
  width: 100%;
}
.st8 { pointer-events: none; } /* only disables text */

/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
  .name, .email, .phone, .address { flex: 0 0 50%; }

  .reg-options {
    flex: 0 0 100%;
    flex-direction: column;
  }

  .reg-options .reg-summary { flex-wrap: wrap; }
  .header { display: none; }
}

/* ====== THEME OVERRIDES ====== */
.fusion-footer {
  position: relative !important;
  z-index: 0 !important;
}

/* ====== CUSTOM DROPDOWN ====== */
.dropdown-container {
  flex: 1 1 auto;
  min-width: 0;
  position: relative;
  display: flex;
  flex-direction: column;
}

.reg-menu {
  display: none;
  position: absolute;
  width: 100%;
  background: #fff;
  border: 1px solid #ccc;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  z-index: 1000;
  max-height: 400px;
  font-size: 14px;
  overflow-y: auto;
}

.dropdown-container.open .reg-menu { display: block; }

.reg-menu-item {
  padding: 7px;
  cursor: pointer;
  border-bottom: 1px solid #eee;
  background: #f9f9f9;
}
.reg-menu-item:hover { background: #eaeaea; }

.reg-submenu {
  display: none;
  background: #fdfdfd;
}
.reg-menu-item.active .reg-submenu { display: block; }

.reg-submenu-option {
  padding: 8px 10px 8px 20px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
}
.reg-submenu-option:hover { background: #f0f8ff; }

.reg-price {
  float: right;
  font-weight: normal;
  color: #555;
}

.reg-dropdown-wrapper {
  display: flex;
  align-items: center;
  gap: 5px;
  width: 100%;
}

.dropdown-toggle {
  width: 100%;
  padding: 4px 10px;
  background-color: #f2f2f2;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-weight: bold;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
  white-space: nowrap;
}

.reg-edit-icon {
  display: none;
  width: 25px;
  text-align: center;
  cursor: pointer;
  color: #0073aa;
  font-size: 14px;
  position: relative;
}
.reg-edit-icon::after {
  content: attr(data-title);
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 9999;
}
.reg-edit-icon:hover::after { opacity: 1; }


.reg-menu-item.selected,
.reg-submenu-option.selected {
  background: #dce9ff;
  font-weight: 700;
  position: relative; /* ok to keep or drop */
}

/* Bold ONLY the selected parent item */
.reg-menu-item.selected { 
  font-weight: 700;
}

/* Reset children back to normal weight */
.reg-menu-item.selected .reg-submenu-option {
  font-weight: 400;   /* or 500/normal */
}

/* Bold ONLY the selected sub option */
.reg-submenu-option.selected {
  font-weight: 700 !important;
}

rect.exhibit { fill:#ccc; cursor:pointer; }
rect.exhibit:not(.selected):hover { fill: yellow !important; }
rect.exhibit.selected,
rect.exhibit.selected:hover { fill: orange !important; }

#modal-title {
  margin-top: 0;
}

#modal-error {
  display: none;
  color: #c00;
  margin: 8px 0 12px;
  font-size: 0.9em;
}

.info-block {
  font-size: 0.9em;
  background: #f5f5f5;
  padding: 10px;
  border-radius: 5px;
  margin-bottom: 15px;
}

.preferred-name-wrapper,
.spouse-name-wrapper,
.confirm-married-wrapper,
.age-wrapper {
  display: none;
}

textarea.modal-field,
select.modal-field,
input.modal-field[type="text"],
input.modal-field[type="number"] {
  width: 100%;
}

.modal-fields {
  margin-bottom: 12px;
}
.reg-submenu-option.disabled {
  pointer-events: none;
  opacity: 0.5;
}
  .original-price {
    text-decoration: line-through;
    margin-right: 0.25em;
  }
  .discounted {
    color: red;
  }
/* Booked booths: red & un-clickable */
rect.exhibit.booked {
  fill: red !important;
  cursor: not-allowed;
  pointer-events: none;
}
