:root {
  --bg: #f6f7fb; 
  --bgAccent: #e9eefb;
  --text: #0f172a;
  --muted: #475569;
  --card: rgba(255, 255, 255, 0.92);
  --surface: rgba(255, 255, 255, 0.72);
  --surface2: rgba(255, 255, 255, 0.55);
  --field: rgba(255, 255, 255, 0.92);
  --border: rgba(15, 23, 42, 0.14);
  --borderStrong: rgba(15, 23, 42, 0.18);
  --headerBg: rgba(246, 247, 251, 0.86);
  --footerBg: rgba(246, 247, 251, 0.75);
  --shadow: 0 25px 60px rgba(2, 6, 23, 0.12);
  --primary: #285f74; --btn: rgba(15, 23, 42, 0.06);
  --btnHoverBorder: rgba(37, 99, 235, 0.55);
  --oppCardBg: #C3EDEF;
  --oppCardSelectedBg: #00C0CA; 
}

html[data-ja-theme="dark"] {
  --bg: #0f172a;
  --bgAccent: #111827;
  --text: #e5eef7;
  --muted: #cbd5e1;
  --card: rgba(15, 23, 42, 0.94);
  --surface: rgba(30, 41, 59, 0.9);
  --surface2: rgba(30, 41, 59, 0.72);
  --field: rgba(15, 23, 42, 0.96);
  --border: rgba(148, 163, 184, 0.24);
  --borderStrong: rgba(148, 163, 184, 0.34);
  --headerBg: rgba(15, 23, 42, 0.9);
  --footerBg: rgba(15, 23, 42, 0.86);
  --shadow: 0 25px 60px rgba(2, 6, 23, 0.45);
  --primary: #28708B;
  --btn: rgba(255, 255, 255, 0.08);
  --btnHoverBorder: rgba(118, 205, 221, 0.65);

  --oppCardBg: #5f8790;
  --oppCardSelectedBg: #008B9C;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Montserrat', sans-serif;
}

html {
  overflow-y: scroll;
}

body.page-template-page-portal,
body.page-template-page-profile,
body.page-slug-profile {
  min-height: 100vh;
}

body.page-template-page-portal .site,
body.page-template-page-portal .site-main,
body.page-template-page-portal .entry-content,
body.page-template-page-portal .post,
body.page-template-page-portal article,
body.page-template-page-profile .site,
body.page-template-page-profile .site-main,
body.page-template-page-profile .entry-content,
body.page-template-page-profile .post,
body.page-template-page-profile article,
body.page-slug-profile .site,
body.page-slug-profile .site-main,
body.page-slug-profile .entry-content,
body.page-slug-profile .post,
body.page-slug-profile article {
  margin: 0;
  padding: 0;
  max-width: none;
}

.ja-portal-root {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.ja-opp-card {
  background: var(--oppCardBg);
  border: none;
  border-radius: 5px;
  box-shadow: 0 4px 10px rgba(40, 95, 116, 0.25);
  padding: 8px 10px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.ja-opp-card.is-selected {
  background: var(--oppCardSelectedBg);
  box-shadow: 0 6px 14px rgba(40, 95, 116, 0.35);
}

.ja-opp-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(40, 95, 116, 0.35);
}

.ja-opp-card__body p {
  margin: 3px 0;
  font-size: 0.9rem;
}

.ja-opp-card__title {
  margin: 0 0 4px 0;
  font-size: 1rem;
  line-height: 1.2;
}

.ja-portal-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--headerBg);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

body.admin-bar .ja-portal-header {
  top: 32px;
}

.ja-portal-nav {
  max-width: 80vw;
  margin: 0 auto;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.ja-brand {
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 0.2px;
  line-height: 95%;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #285f74;
  text-decoration: none;
  white-space: nowrap;
}

.ja-brand-logo {
  width: 64px;
  height: 64px;
  display: block;
  flex: 0 0 18px;
  object-fit: contain;
}

.ja-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #60a5fa;
  box-shadow: 0 0 0 6px rgba(96, 165, 250, 0.15);
}

.ja-form-message {
  margin-top: 16px;
  font-size: 0.95rem;
}

.ja-form-message.is-success {
  color: #15803d;
}

.ja-form-message.is-error {
  color: #b91c1c;
}

.ja-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  justify-content: flex-end;
  margin-left: auto;
}

.ja-header-preferences {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: 8px;
  flex: 0 0 auto;
  white-space: nowrap;
}

.ja-btn-link,
.ja-btn,
button.ja-btn-link,
button.ja-btn {
  appearance: none;
  text-decoration: none;
  padding: 9px 14px;
  border-radius: 12px;
  font-weight: 700;
  border: 1px solid var(--borderStrong);
  background: var(--btn);
  color: var(--text);
  transition: 0.15s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.2;
}

.ja-btn-link:hover,
.ja-btn:hover {
  border-color: var(--btnHoverBorder);
}

.ja-btn-link.primary,
.ja-btn.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.ja-page-wrap {
  flex: 1;
  width: 70vw;
  max-width: 70vw;
  margin: 0 auto;
  padding: 54px 18px 32px;
  box-sizing: border-box;
}

.ja-card {
  width: 100%;
  max-width: none;
  background: var(--card);
  border: 1px solid var(--borderStrong);
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow);
  box-sizing: border-box;
}

.ja-card.wide {
  width: 100%;
  max-width: none;
}

.ja-view {
  display: block;
  margin-bottom: 40px;
}

.ja-view:last-child {
  margin-bottom: 0;
}

.ja-view h1 {
  margin: 0 0 10px;
  font-size: clamp(1.8rem, 2.6vw, 2.4rem);
  line-height: 1.15;
}

.ja-view h2 {
  margin: 0 0 10px;
  font-size: 1.2rem;
  line-height: 1.2;
}

.ja-sub {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.5;
}

.ja-section-box {
  margin-top: 14px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--borderStrong);
  background: var(--surface2);
}

.ja-derived-value {
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px dashed rgba(255, 255, 255, 0.18);
  color: #000000;
  font-size: 0.95rem;
}

.ja-derived-value.is-populated {
  font-weight: 600;
  color: #1f2937;
  border-style: solid;
}

.ja-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.ja-split2 {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 14px;
  margin-top: 14px;
}

.ja-op-list,
.ja-map-box {
  border: 1px solid var(--borderStrong);
  background: var(--surface2);
  border-radius: 16px;
  padding: 12px;
  min-height: 520px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.ja-map-frame-wrap iframe,
#mapFrameGuest {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100%;
  border: 0;
}

.ja-map-frame-wrap {
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
}

label {
  display: block;
  margin: 12px 0 6px;
  font-weight: 700;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="tel"],
input[type="number"],
input[type="range"],
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--borderStrong);
  background: var(--field);
  color: var(--text);
  outline: none;
  box-sizing: border-box;
}

input[type="range"] {
  padding: 0;
}

textarea {
  min-height: 88px;
  resize: vertical;
}

.ja-btn-row {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.ja-msg {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.95rem;
  min-height: 1.2em;
}

#gOppListContainer {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.ja-portal-footer {
  border-top: 1px solid var(--border);
  background: var(--footerBg);
  backdrop-filter: blur(6px);
  margin-top: 24px;
}

.ja-footer-inner {
  max-width: 80vw;
  margin: 0 auto;
  padding: 24px 18px;
  color: var(--muted);
  font-weight: 700;
  font-size: 1.2rem;
  text-align: center;
}

@media (max-width: 900px) {
  body.admin-bar .ja-portal-header {
    top: 46px;
  }

  .ja-grid2,
  .ja-split2 {
    grid-template-columns: 1fr;
  }

  .ja-actions {
    flex-wrap: wrap;
  }

  .ja-page-wrap {
    padding-top: 32px;
  }

  .ja-login-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .ja-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .ja-form-group label {
    font-weight: 700;
    color: var(--text);
  }

  .ja-form-group input[type="text"],
  .ja-form-group input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--borderStrong);
    border-radius: 10px;
    background: var(--field);
    box-sizing: border-box;
    font: inherit;
  }

  .ja-remember label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
  }
}
body.page-template-page-volunteer-registration .ja-registration-card {
  width: 75%;
  max-width: 1200px;
  margin: 0 auto;
}

@media (max-width: 1024px) {
  body.page-template-page-volunteer-registration .ja-registration-card {
    width: 90%;
  }
}

@media (max-width: 640px) {
  body.page-template-page-volunteer-registration .ja-registration-card {
    width: 100%;
  }
}

body.page-template-page-volunteer-registration .ja-name-row {
  display: grid;
  grid-template-columns: 10fr 45fr 45fr;
  gap: 16px;
  align-items: end;
}

body.page-template-page-volunteer-registration .ja-name-row .ja-field {
  margin-bottom: 0;
  min-width: 0;
}

@media (max-width: 768px) {
  body.page-template-page-volunteer-registration .ja-name-row {
    grid-template-columns: 1fr;
  }
}

body.page-template-page-volunteer-registration .ja-two-col-row,
body.page-template-page-volunteer-registration .ja-four-col-row {
  display: flex;
  gap: 16px;
  align-items: flex-end;
}

body.page-template-page-volunteer-registration .ja-two-col-row__col {
  flex: 0 0 calc(50% - 8px);
  max-width: calc(50% - 8px);
}

body.page-template-page-volunteer-registration .ja-four-col-row__col {
  flex: 0 0 calc(25% - 12px);
  max-width: calc(25% - 12px);
}

body.page-template-page-volunteer-registration .ja-two-col-row .ja-field,
body.page-template-page-volunteer-registration .ja-four-col-row .ja-field {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  body.page-template-page-volunteer-registration .ja-two-col-row,
  body.page-template-page-volunteer-registration .ja-four-col-row {
    display: block;
  }

  body.page-template-page-volunteer-registration .ja-two-col-row__col,
  body.page-template-page-volunteer-registration .ja-four-col-row__col {
    max-width: 100%;
  }
}


.ja-brand-text {
  display: inline-block;
}

.ja-pill-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--borderStrong);
  border-radius: 999px;
  background: var(--surface);
}

.ja-pill-toggle__btn,
.ja-theme-toggle {
  appearance: none;
  border: 1px solid var(--borderStrong);
  background: var(--btn);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: 0.15s ease;
}

.ja-pill-toggle__btn {
  min-width: 42px;
  padding: 9px 12px;
  border-radius: 999px;
}

.ja-pill-toggle__btn:hover,
.ja-pill-toggle__btn[aria-pressed="true"],
.ja-theme-toggle:hover {
  border-color: var(--btnHoverBorder);
}

.ja-pill-toggle__btn[aria-pressed="true"] {
  background: var(--primary);
  color: #fff;
}

.ja-theme-toggle {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 999px;
  justify-content: center;
  font-size: 18px;
}

.ja-notice {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--borderStrong);
  background: var(--surface);
  color: var(--text);
}

.ja-notice-success {
  border-color: rgba(22, 163, 74, 0.32);
  background: rgba(34, 197, 94, 0.12);
  color: #166534;
}

.ja-notice-error {
  border-color: rgba(220, 38, 38, 0.32);
  background: rgba(239, 68, 68, 0.12);
  color: #991b1b;
}

html[data-ja-theme="dark"] .ja-notice-success {
  color: #bbf7d0;
}

html[data-ja-theme="dark"] .ja-notice-error {
  color: #fecaca;
}

.ja-field-full {
  grid-column: 1 / -1;
}

.ja-form-grid {
  display: block;
}

input[readonly],
textarea[readonly] {
  background: var(--surface);
  color: var(--muted);
}

@media (max-width: 1200px) {
  .ja-page-wrap {
    width: min(100%, 1100px);
    max-width: min(100%, 1100px);
  }

  .ja-portal-nav,
  .ja-footer-inner {
    max-width: min(100%, 1100px);
  }
}

@media (max-width: 900px) {
  .ja-portal-nav {
    max-width: 100%;
    padding: 12px 16px;
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .ja-brand {
    white-space: normal;
    align-items: flex-start;
  }

  .ja-brand-logo {
    width: 56px;
    height: 56px;
  }

  .ja-header-preferences {
    margin-right: 0;
  }

  .ja-actions {
    width: 100%;
    justify-content: flex-start;
    margin-left: 0;
  }

  .ja-page-wrap {
    width: 100%;
    max-width: 100%;
    padding: 28px 16px 24px;
  }

  .ja-card {
    padding: 20px;
    border-radius: 18px;
  }
}

@media (max-width: 640px) {
  .ja-portal-nav {
    gap: 14px;
  }

  .ja-brand {
    font-size: 18px;
    gap: 12px;
  }

  .ja-actions {
    gap: 10px;
  }

  .ja-header-preferences {
    width: 100%;
    justify-content: flex-start;
  }

  .ja-pill-toggle__btn,
  .ja-btn-link,
  .ja-btn,
  button.ja-btn-link,
  button.ja-btn {
    min-height: 44px;
  }

  .ja-card {
    padding: 16px;
    border-radius: 16px;
  }

  .ja-section-box {
    padding: 12px;
    border-radius: 14px;
  }

  .ja-view {
    margin-bottom: 28px;
  }

  .ja-view h1 {
    font-size: clamp(1.7rem, 8vw, 2.1rem);
  }

  .ja-sub,
  .ja-footer-inner {
    font-size: 0.95rem;
  }
}

/* Opportunity filters layout */
.ja-opportunity-filters-grid {
  grid-template-columns: 1fr 2fr 1fr 1fr;
  align-items: start;
}

.ja-opportunity-filters-grid > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.ja-opportunity-filters-grid > div label {
  margin: 0 0 6px;
}

.ja-opportunity-filters-grid input[type="range"] {
  width: 100%;
}

/* Map and calendar tabs */
.ja-map-box {
  padding-top: 8px;
}

.ja-map-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  min-height: 28px;
}

.ja-map-tab {
  appearance: none;
  border: 1px solid var(--borderStrong);
  background: var(--btn);
  color: var(--text);
  border-radius: 10px 10px 0 0;
  padding: 4px 12px;
  min-height: 28px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  line-height: 1.1;
}

.ja-map-tab.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.ja-map-panel {
  display: none;
  flex: 1 1 auto;
  min-height: 0;
}

.ja-map-panel.is-active {
  display: flex;
  flex-direction: column;
}

.ja-calendar-toolbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.ja-calendar-month {
  text-align: center;
  font-weight: 700;
  text-transform: capitalize;
}

.ja-calendar-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
}

.ja-calendar-weekday {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
}

.ja-calendar-day {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px;
  min-height: 96px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

@media (max-width: 768px) {
  .ja-calendar-toolbar {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "month month"
      "prev next";
    gap: 10px;
  }

  .ja-calendar-toolbar #jaCalendarMonthLabel {
    grid-area: month;
    text-align: center;
  }

  .ja-calendar-toolbar #jaCalendarPrev {
    grid-area: prev;
    justify-content: center;
  }

  .ja-calendar-toolbar #jaCalendarNext {
    grid-area: next;
    justify-content: center;
  }

  .ja-calendar-grid {
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
  }

  .ja-calendar-day {
    min-height: 84px;
    padding: 6px;
  }

  .ja-calendar-weekday {
    font-size: 0.8rem;
  }

  .ja-calendar-day-number {
    font-size: 0.85rem;
  }

  .ja-calendar-item,
  .ja-calendar-empty {
    font-size: 0.8rem;
    line-height: 1.2;
  }
}

.ja-calendar-day.is-empty {
  background: transparent;
  border: none;
}

.ja-calendar-day-number {
  font-weight: 700;
  font-size: 0.9rem;
}

.ja-calendar-day-items {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ja-calendar-item {
  appearance: none;
  border: 1px solid var(--borderStrong);
  background: #C3EDEF;
  color: var(--text);
  border-radius: 8px;
  padding: 4px 6px;
  text-align: left;
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}

.ja-calendar-empty {
  font-size: 0.75rem;
  color: var(--muted);
}

@media (max-width: 1100px) {
  .ja-opportunity-filters-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 900px) {
  .ja-opportunity-filters-grid {
    grid-template-columns: 1fr;
  }

  .ja-calendar-grid {
    min-width: 700px;
  }

  .ja-map-panel {
    overflow-x: auto;
  }
}
.ja-opp-card {
  position: relative;
}

.ja-opp-card__body {
  padding-bottom: 58px;
}

.ja-opp-card__actions {
  position: absolute;
  right: 24px;
  bottom: 16px;
  display: flex;
  gap: 8px;
}
.ja-opp-card {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
}

#gOppListContainer {
  overflow-x: hidden;
}
