/* =========================================================
   AARP Opportunities — Compact, Primary-Themed UI
   ========================================================= */

/* ==============================
   Theme tokens
   ============================== */
:root {
  --container-max-width: 1000px;
  --dual-list-width: 320px;
  --dual-list-height: 340px;

  --primary: #EC1300;
  /* AARP red */
  --primary-600: #C31100;
  /* darker */
  --primary-800: #8B0B00;
  --text: #2C3E50;
  --muted: #6B7280;

  --bg-page: #F4F7FA;
  --bg-panel: #FFFFFF;

  --border: #D1D5DB;
  --table-header: #EDEFF2;

  --link: #0D6EFD;
  --link-hover: #0A58CA;
  --danger: #DA5D69;
  --warning: #444444;
  --success: #2ecc71;

  --radius-6: 6px;
  --radius-8: 8px;

  --fs-base: 14px;
  --fs-sm: 13px;
  --fs-table: 13.5px;
}

/* ==============================
   Base
   ============================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  background: var(--bg-page);
  color: var(--text);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: var(--fs-base);
  line-height: 1.5;
}

/* ==============================
   Container & Panels (compact)
   ============================== */
.container {
  max-width: var(--container-max-width);
  width: 100%;
  margin: 8px auto;
  /* tighter overall */
  padding: 12px;
  /* reduced container padding */
  background: var(--bg-panel);
  border-radius: var(--radius-8);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
}

.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-8);
  background: #fff;
  margin: 10px 0;
  /* less space between panels */
      padding: 10px;
    transition: 0.3s;
}

.panel-heading {
  font-size: 15px;
  font-weight: 700;
  padding: 8px 10px;
  /* tighter header */
  color: #fff;
  border-radius: var(--radius-8) var(--radius-8) 0 0;
  background: linear-gradient(90deg, var(--primary), var(--primary-600) 55%, var(--primary-800));
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-content {
  padding: 8px 10px;
  /* reduced inner padding */
}

/* ==============================
   Title & Header
   ============================== */
.panel-title-container {
  border: 1px solid var(--border);
  border-radius: var(--radius-8);
  background: #F6F8FB;
  padding: 8px 10px;
  margin-bottom: 10px;
  /* tighter */
}

.page-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  text-align: center;
}

.mandatory-note {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
  text-align: right;
}

.mandatory-note .asterisk {
  color: #e74c3c;
  font-weight: 700;
}

/* Optional hero header (compact) */
.hero {
  background: linear-gradient(135deg, #111827 0%, #1f2937 60%, #374151);
  color: #fff;
  border-radius: var(--radius-8);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
  margin-bottom: 8px;
}

.hero img {
  height: 30px;
  width: auto;
}

.hero-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.hero-sub {
  margin: 0;
  font-size: 12.5px;
  opacity: .85;
}

/* ==============================
   Form layout (denser)
   ============================== */
.form-group {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px 12px;
  /* reduced gap */
  margin-bottom: 12px;
  /* tighter */
}

.form-label {
  min-width: 120px;
  margin-right: 8px;
  font-weight: 500;
  color: var(--text);
  padding: 6px 0;
}

.input-container {
  position: relative;
  flex: 1 1 250px;
  min-width: 220px;
}

.form-input,
.form-input select,
.form-input textarea {
  width: 100%;
  padding: 8px 36px 8px 10px;
  /* tighter inputs */
  border: 1.25px solid var(--border);
  border-radius: var(--radius-6);
  font-size: 1rem;
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border .15s ease, box-shadow .15s ease;
}

.form-input:focus,
.form-input select:focus,
.form-input textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(236, 19, 0, .08);
  background: #FCFEFF;
}

.form-input.valid,
.form-input select.valid,
.form-input textarea.valid {
  border-color: var(--success);
}

.form-input.error,
.form-input select.error,
.form-input textarea.error {
  border-color: #e74c3c;
}

.validation-icon {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  display: none;
  pointer-events: none;
  font-size: 1rem;
}

.form-input.valid~.validation-icon,
.form-input.select.valid~.validation-icon,
.form-input.textarea.valid~.validation-icon {
  display: inline-block;
  color: var(--success);
}

.form-input.error~.validation-icon {
  display: inline-block;
  color: #e74c3c;
}

/* Radios (compact) */
input[type="radio"] {
  appearance: none;
  width: 16px;
  height: 16px;
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  margin: 0 6px 0 0;
  vertical-align: middle;
}

input[type="radio"]:checked {
  border: 5px solid var(--primary);
  background: var(--primary);
}

.radio-label {
  font-size: 13.5px;
  color: var(--text);
  cursor: pointer;
}

/* Inline helper groups */
.location-fields,
.datetime-fields {
  margin-top: 6px;
  padding-left: 10px;
  border-left: 2px solid #e1e4e8;
  background: #fafafa;
}

/* ==============================
   Row/Col helpers
   ============================== */
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.col {
  flex: 1 1 300px;
  min-width: 260px;
}

/* ==============================
   Header toolbar (single row desktop)
   ============================== */
.header-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  /* compact */
  flex-wrap: wrap;
}

.search-bar {
  flex: 1 1 260px;
}

.search-bar input {
  width: 100%;
  height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-6);
  background: #fff;
  outline: none;
}

.filter-bar select {
  height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-6);
  background: #fff;
  outline: none;
}

/* ==============================
   Buttons — shrink to text
   ============================== */
.button-row,
.button-container {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

button,
button[type="submit"],
button[type="button"],
.submit-btn,
.cancel-btn,
.back-btn {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  border-radius: var(--radius-6);
  padding: 6px 10px;
  /* shrink-to-text */
  line-height: 1.1;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  /* allow compact width */
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
}

button:hover {
  background: var(--primary-600);
}

.cancel-btn {
  background: #e74c3c;
}

.back-btn {
  background: #7f8c8d;
}

/* Link-style submit (title) — no “pill” */
.link-button {
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  min-width: 0 !important;
  height: auto !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  display: inline;
  text-align: left;
  font: inherit;
  line-height: inherit;
  color: var(--link);
  text-decoration: underline;
  cursor: pointer;
}

.link-button:hover {
  text-decoration: none;
  color: var(--link-hover);
}

.link-button:focus {
  outline: none;
}

/* Emphasis text helpers */
.text-danger {
  color: #e74c3c;
  font-weight: 600;
}

.text-optional {
  color: var(--success);
  font-weight: 600;
}

.hidden {
  display: none;
}

/* ==============================
   Dual list — side-by-side
   ============================== */
.dual-list-container {
  display: grid;
  grid-template-columns: minmax(var(--dual-list-width), 1fr) minmax(var(--dual-list-width), 1fr);
  gap: 12px;
  /* tighter gap */
  margin-top: 6px;
}

.available-list,
.selected-list {
  max-height: var(--dual-list-height);
  border: 1px solid var(--border);
  border-radius: var(--radius-6);
  padding: 8px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* let UL scroll inside */
}

.available-list h6,
.selected-list h6 {
  margin: 0 0 6px 0;
  font-size: 13.5px;
  color: var(--text);
}

.filter-input {
  width: 100%;
  padding: 6px 8px;
  margin: 0 0 6px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-6);
  font-size: 13.5px;
  background: #fff;
}

.available-list ul,
.selected-list ul {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #c7ccd3 #f1f3f5;
}

.available-list li,
.selected-list li {
  padding: 7px 8px;
  border-radius: 4px;
  margin: 0 0 4px 0;
  font-size: 13.5px;
  transition: background .15s ease, border-color .15s ease;
  word-break: break-word;
}

.available-list li {
  background: #F8FAFC;
  border-left: 3px solid var(--border);
}

.available-list li:hover {
  background: #EEF2F6;
  border-left-color: var(--primary);
}

.selected-list li {
  background: #FFF0F0;
  color: #B01810;
  border-left: 3px solid var(--primary);
}

.selected-list li:hover {
  background: #FFE7E7;
}

/* ==============================
   Tables — compact, sticky header, lines
   ============================== */
.table-container {
  border: 1px solid var(--border);
  border-radius: var(--radius-6);
  background: #fff;
  overflow: hidden;
  /* no extra box around table */
}

.table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.table thead th {
  background: var(--table-header);
  color: #1f2937;
  font-weight: 600;
  font-size: 13.5px;
  padding: 6px 8px;
  /* compact header cells */
  height: 32px;
  line-height: 1.2;
  position: sticky;
  top: 0;
  z-index: 1;
  border-bottom: 2px solid #cfd3d8;
  white-space: nowrap;
}

.table td {
  font-size: var(--fs-table);
  line-height: 1.3;
  padding: 6px 8px;
}

.table th,
.table td {
  border-right: 1px solid #cfd3d8;
  border-bottom: 1px solid #cfd3d8;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.table th:last-child,
.table td:last-child {
  border-right: none;
}

/* Column sizing (5 columns) */
.table th:nth-child(1),
.table td:nth-child(1) {
  width: 30%;
}

.table th:nth-child(2),
.table td:nth-child(2) {
  width: 12%;
}

.table th:nth-child(3),
.table td:nth-child(3) {
  width: 20%;
}

.table th:nth-child(4),
.table td:nth-child(4) {
  width: 10%;
}

.table th:nth-child(5),
.table td:nth-child(5) {
  width: 28%;
}

/* Sort indicators (optional) */
.table th {
  position: relative;
  cursor: pointer;
}

.table th::after {
  content: "\2195";
  position: absolute;
  right: .5rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: .8rem;
  color: #8a8f98;
  pointer-events: none;
}

.table th.ascending::after {
  content: "▲";
}

.table th.descending::after {
  content: "▼";
}

/* Row hover */
.table tbody tr:hover td {
  background: rgba(236, 19, 0, .04);
}

/* ==============================
   Responsive
   ============================== */
@media (max-width: 900px) {
  .container {
    padding: 10px;
  }

  .dual-list-container {
    grid-template-columns: 1fr 1fr;
    /* keep side-by-side, tighter min widths */
  }

  .col {
    min-width: 220px;
  }
}

@media (max-width: 640px) {
  .panel-title-container {
    padding: 6px 8px;
  }

  .header-row {
    gap: 6px;
  }

  .search-bar input,
  .filter-bar select {
    width: 100%;
  }

  .dual-list-container {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .form-label {
    min-width: 100%;
    margin-right: 0;
  }

  .input-container {
    min-width: 100%;
  }

  .button-row,
  .button-container {
    flex-direction: column;
  }

  button,
  .submit-btn,
  .cancel-btn,
  .back-btn {
    width: 100%;
  }
}

.panel-content-left {
    text-align: left;
    padding: 8px;
    background-color: #f0f0f0;
    color: #252323;
    border-radius: 5px;
    opacity: 0.8;
}
.panel-content-left p {
    font-size: 0.85rem;
    margin: 2px 0;
}

.form-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.form-group {
    margin-bottom: 1px;
    flex: 1;
}

.form-control {
    border-radius: 6px;
    border: 1px solid #ced4da;
    padding: 8px;
    color: #495057;
    font-size: 0.9rem;
    width: 95%;
}

.form-control:hover {
    background-color: #eff3f5;
    border-color: #1b415a;
}

.form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-control.is-invalid {
    border-color: #dc3545;
}

.alert-message {
    background-color: #fee;
    border: 1px solid #e08e8e;
    padding: 12px 18px;
    border-radius: 6px;
    color: #444;
    font-size: 14px;
    max-width: 700px;
    margin: 20px auto;
}

.alert-title {
    text-align: center;
    color: #a94442;
    font-weight: bold;
    font-size: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.alert-icon {
    font-size: 16px;
    color: #a94442;
}

.alert-details {
    text-align: center;
    font-size: 14px;
    color: #555;
}


.btn-primary {
    background-color: #3498db;
    border-color: #2980b9;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.3s ease;
    display: block;
    margin: 10px auto;
    width: fit-content;
}

.btn-primary:hover {
    /*background: var(--hover-color);*/
     background-color: #43A047;
  	/* lighter green on hover */
  	box-shadow: 0 4px 10px rgba(67, 160, 71, 0.4);
  	transform: translateY(-2px);
}


.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fff5f5;
    border: 1px solid #cc0000;
    border-radius: 8px;
    padding: 20px;
    width: 400px;
    font-family: 'Segoe UI', sans-serif;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.modal-buttons {
    margin-top: 20px;
}

.modal-buttons button {
    padding: 8px 14px;
    margin: 0 10px;
    font-size: 14px;
    cursor: pointer;
}

/* Styles for Guest Panel */
.guest-count-row {
    display: flex;
    /* Aligns label and select in one line */
    align-items: center;
    /* Vertically center the items */
}

.guest-count-row label {
    margin-right: 10px;
    /* Space between label and select */
    flex-basis: 50%;
    /* Occupy 50% of space */
    padding: 20px;
}

.guest-count-row select {
    flex-basis: 20%;
    /* Occupy 50% of space */
}

.guest-email-container {
    display: block;
    grid-template-columns: 1fr auto auto;
    /* Align the elements horizontally */
    align-items: center;
    /* Vertically align items */
    justify-content: flex-end;
    /* Right-align items */
}

.guest-email-input {
    width: 100%;
    /* The key change: make the input use all available space */
    box-sizing: border-box;
    /* Ensure padding and border are included in width */
}

/* Style for the table-like format */
.info-table {
    width: 100%;
    border-collapse: collapse;
    /* Removes spacing between table cells */
    background-color: var(--table-bg-color);
    border-radius: 8px;
    /* Rounded corners for the info section */
    overflow: hidden;
    /* Ensure rounded corners are visible */
}

.info-table tr {
    display: flex;
    /* Use flexbox for alignment */
    justify-content: space-between;
    /* Align label and value */
    padding: 10px 15px;
}

.info-table tr:nth-child(odd) {
    background-color: rgba(0, 0, 0, 0.03);
    /* Optional: subtle striping */
}

.info-table th,
.info-table td {
    text-align: left;
    padding: 0;
    /* Remove default padding */
    margin: 0;
    flex: 1;
    /* Distribute available space evenly */
}

.info-table th {
    font-weight: bold;
    /* Make the labels bold */
    color: var(--secondary-color);
}

.info-table td {
    color: var(--text-color);
    text-align: left;
    /* Align the values to the right */
}

.captcha-error-box {
    background-color: #ffdddd;
    color: red;
    /* Changed from #b30000 to pure red */
    border: 2px solid #ff0000;
    padding: 12px;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    margin-top: 10px;
    border-radius: 6px;
    display: inline-block;
}