/* Base shared styling (desktop/mobile/tablet handled via media queries).
 * Keep CSS out of HTML files.
 * NOTE: We’ll refine to match tutor-with-amit/tutorDesk as we migrate more pages.
 */

:root {
  --bg: #0b0d12;
  --surface: #0f172a;         /* dark blue */
  --surface-2: #111827;

  --border: #24324d;
  --text: #ffffff;
  --muted: #9ca3af;
  --accent: #4f9dff;
  --ok: #22c55e;
  --bad: #ef4444;

  --radius-lg: 16px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

main {
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: 14px 16px 60px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { margin: 14px 0 10px; }

.dt-muted { color: var(--muted); }
.dt-error { color: var(--bad); }
.dt-ok { color: var(--ok); }

.dt-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
}

/* Header */
.dt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: relative;
}

.dt-brand {
  flex: 0 0 auto;
}

.dt-brand-link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  color: var(--text);
}

.dt-brand-title {
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.dt-brand-subtitle {
  font-size: 0.95rem;
  color: var(--muted);
}

.dt-header nav[data-nav] {
  flex: 1 1 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.dt-header nav[data-nav] a,
.dt-header nav[data-nav] button {
  font-size: 1.05rem;
  font-weight: 600;
  padding: 9px 14px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
}

.dt-header nav[data-nav] a:hover,
.dt-header nav[data-nav] button:hover {
  border-color: var(--border);
  background: var(--surface-2);
}

.dt-header nav[data-nav] a.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(79, 157, 255, 0.2);
}

/* Hamburger menu button (hidden on desktop) */
.dt-hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
  margin-left: auto;
}

.dt-hamburger svg {
  width: 24px;
  height: 24px;
}

.dt-hamburger svg path {
  transition: all 0.3s ease;
}

.dt-hamburger.active .hamburger-top {
  transform: translateY(6px) rotate(45deg);
  transform-origin: center;
}

.dt-hamburger.active .hamburger-middle {
  opacity: 0;
}

.dt-hamburger.active .hamburger-bottom {
  transform: translateY(-6px) rotate(-45deg);
  transform-origin: center;
}

/* Hide mobile brand link on desktop */
.dt-nav-brand-mobile {
  display: none;
}

/* Mobile menu styles (applies below 640px) */
@media (max-width: 639px) {
  .dt-hamburger {
    display: flex;
  }

  .dt-header {
    flex-wrap: wrap;
  }

  .dt-header nav[data-nav] {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: auto;
    background: var(--surface);
    border-left: 1px solid var(--border);
    border-radius: 16px 0 0 16px;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 60px 20px 20px;
    gap: 8px;
    transition: right 0.3s ease;
    overflow: hidden;
    z-index: 1000;
    visibility: hidden;
  }

  .dt-header nav[data-nav].mobile-open {
    right: 0;
    visibility: visible;
  }

  /* Mobile brand link - only show in mobile menu */
  .dt-nav-brand-mobile {
    display: block !important;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent) !important;
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
    padding-bottom: 16px !important;
  }

  .dt-header nav[data-nav] a,
  .dt-header nav[data-nav] button {
    width: 100%;
    text-align: left;
    padding: 12px 16px;
    border-radius: 8px;
  }

  /* Overlay behind mobile menu */
  .dt-header nav[data-nav].mobile-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
  }
}

/* Search layout */
.results-panel {
  position: relative;
}

.map-shell {
  position: relative;
}

.dt-map {
  height: 504px;
  width: 100%;
  background: var(--surface-2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
  position: relative;
}

/* Map info panel */
.map-info-panel {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 30%;
  max-width: none;
  background: transparent;
  overflow: hidden;
  z-index: 1000;
  pointer-events: none;
  transform: translateX(-100%);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.map-info-panel.is-open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.map-info-handle {
  width: 44px;
  height: 6px;
  border-radius: 999px;
  margin: 8px auto 0;
  background: rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
  display: none;
}

.map-info-panel[hidden] {
  display: none;
}

.map-info-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  font-size: 24px;
  line-height: 1;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  pointer-events: auto;
}

.map-info-close:hover {
  background: rgba(0, 0, 0, 0.8);
}

.map-info-content {
  padding: 12px;
  pointer-events: auto;
  height: auto;
  overflow: visible;
}

.map-info-panel .tutor-card-top {
  flex-direction: column;
  align-items: flex-start;
}

.map-info-panel .tutor-card-identity {
  flex-direction: column;
  align-items: flex-start;
}

@media (max-width: 800px) {
  .map-info-panel {
    left: 0;
    right: 0;
    top: auto;
    bottom: 0;
    width: 100%;
    height: 20%;
    overflow-y: auto;
    transform: translateY(100%);
  }

  .map-info-panel.is-open {
    transform: translateY(0);
  }

  .map-info-panel.is-expanded {
    height: 65%;
  }

  .map-info-content {
    height: 100%;
    overflow-y: auto;
  }

  .map-info-handle {
    display: block;
  }
}

.dt-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: flex-start;
}

.dt-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0;
}

.dt-autocomplete {
  position: relative;
}

.dt-autocomplete-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
  max-height: 280px;
  overflow-y: auto;
  z-index: 50;
}

.dt-autocomplete-panel[hidden] {
  display: none;
}

.dt-autocomplete-item {
  padding: 10px 12px;
  cursor: pointer;
  color: var(--text);
}

.dt-autocomplete-item:hover,
.dt-autocomplete-item.is-active {
  background: rgba(79, 157, 255, 0.15);
}

/* Field/layout helpers (no inline styles in HTML) */
.dt-field--grow {
  min-width: 220px;
  flex: 1 1 240px;
}

.dt-field--grow-wide {
  min-width: 260px;
  flex: 1 1 280px;
}

.dt-field--max320 {
  flex: 0 1 320px;
  max-width: 320px;
}

.dt-mt-12 {
  margin-top: 12px;
}

.dt-mt-6 {
  margin-top: 6px;
}

.dt-strong {
  font-weight: 800;
}

/* Back-compat for older pages still using generic class names */
.muted { color: var(--muted); }
.error { color: var(--bad); }
.row { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin: 12px 0;
}

label { font-weight: 600; }

input, select, textarea {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
}

/* Tutor profile page */
.profile-page__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.profile-page__content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px 22px;
  box-shadow: 0 12px 24px rgba(2, 6, 23, 0.35);
}

.profile-form {
  display: grid;
  gap: 18px;
}

.profile-form__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-form__fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  background: rgba(15, 23, 42, 0.6);
  display: grid;
  gap: 12px;
}

.profile-form__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 34px;
  padding: 6px 0;
  color: var(--muted);
}

.profile-form__chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(79, 157, 255, 0.15);
  border: 1px solid rgba(79, 157, 255, 0.35);
  color: var(--text);
  font-size: 0.9rem;
}

.profile-form__chip-remove {
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 1rem;
  cursor: pointer;
}

.profile-form__course-list {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.25);
  padding: 10px;
  max-height: 360px;
  overflow: auto;
  display: grid;
  gap: 8px;
}

.profile-form__course-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(36, 50, 77, 0.6);
  cursor: pointer;
}

.profile-form__course-row.is-selected {
  border-color: rgba(79, 157, 255, 0.6);
  background: rgba(59, 130, 246, 0.18);
}

.profile-form__course-label {
  font-size: 0.92rem;
  color: var(--text);
}

.profile-form__course-status {
  font-size: 0.85rem;
  font-weight: 600;
  color: #d1d5db;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(79, 157, 255, 0.4);
  background: rgba(79, 157, 255, 0.15);
}

.profile-form__course-status:empty {
  display: none;
}

#university-select {
  font-size: 1rem;
}

#language-select,
#language-select option {
  font-size: 1.05rem;
  line-height: 1.4;
}

.profile-form__pending {
  border: 1px solid rgba(79, 157, 255, 0.35);
  border-radius: 12px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.35);
  display: grid;
  gap: 8px;
}

.profile-form__pending-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.profile-form__pending-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 4px;
  border-bottom: 1px solid rgba(36, 50, 77, 0.4);
}

.profile-form__pending-row:last-child {
  border-bottom: none;
}

.profile-form__subject {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 12px;
  margin-bottom: 8px;
  background: rgba(15, 23, 42, 0.4);
}

.profile-form__subject summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
}

.profile-form__subject-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.profile-form__subject-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.35);
}

.profile-form__fieldset legend {
  font-weight: 700;
  padding: 0 8px;
}

.profile-form__row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-form__row > #selected-languages {
  flex: 1 1 auto;
}

.profile-form__row--wrap {
  flex-wrap: wrap;
}

.profile-form__multiselect {
  min-height: 240px;
  width: min(100%, 520px);
}

.profile-form__selected {
  margin-top: 8px;
  padding: 12px;
  background: var(--surface-2);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.profile-form__selected strong {
  display: block;
  margin-bottom: 6px;
  color: #e5e7eb;
}

.profile-form__selected ul {
  list-style: disc;
  margin: 0 0 0 20px;
  color: #d1d5db;
}

.profile-form__upload {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px dashed rgba(79, 157, 255, 0.45);
  background: rgba(15, 23, 42, 0.35);
  display: grid;
  gap: 10px;
}

.profile-form__file-input {
  display: none;
}

.profile-form__preview {
  margin-top: 6px;
}

.profile-form__preview img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 10px 18px rgba(2, 6, 23, 0.35);
}

.profile-form__preview-img--clickable {
  cursor: pointer;
}

.profile-form__preview--photo img {
  max-width: 220px;
}

.profile-form__preview--cover img {
  max-width: 520px;
}

.crop-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
}

.crop-modal[hidden] {
  display: none;
}

.crop-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.7);
}

.crop-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(92vw, 520px);
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(79, 157, 255, 0.35);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.6);
  display: grid;
  gap: 14px;
}

.crop-modal__header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: #e5e7eb;
}

.crop-modal__content {
  display: grid;
  gap: 12px;
}

.crop-modal__viewport {
  position: relative;
  width: min(78vw, 360px);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(2, 6, 23, 0.85);
  touch-action: none;
}

.crop-modal--cover .crop-modal__viewport {
  aspect-ratio: 2 / 1;
  width: min(86vw, 420px);
}

.crop-modal__canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.crop-modal__mask {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 200vmax rgba(2, 6, 23, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.7);
  pointer-events: none;
}

.crop-modal--cover .crop-modal__mask {
  border-radius: 14px;
}

.crop-modal__zoom {
  display: grid;
  gap: 6px;
  color: var(--muted);
}

.crop-modal__zoom input {
  width: 100%;
}


.crop-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.crop-modal__actions button {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(79, 157, 255, 0.6);
  background: rgba(15, 23, 42, 0.8);
  color: #e5e7eb;
  font-weight: 600;
  cursor: pointer;
}

.crop-modal__actions button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#photo-crop-status.is-loading::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 8px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  animation: crop-spin 0.9s linear infinite;
  vertical-align: -2px;
}

@keyframes crop-spin {
  to {
    transform: rotate(360deg);
  }
}

.profile-form__note {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(79, 157, 255, 0.35);
  background: rgba(15, 23, 42, 0.5);
  color: var(--muted);
  line-height: 1.4;
}

.profile-form__link {
  color: #4f9dff;
  text-decoration: underline;
  font-weight: 600;
}

.profile-form__submit {
  justify-self: start;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid rgba(79, 157, 255, 0.7);
  background: linear-gradient(135deg, rgba(79, 157, 255, 0.9), rgba(59, 130, 246, 0.9));
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.profile-form__submit:hover {
  filter: brightness(1.08);
}

/* Floating label effect (Google-style) */
.floating-label-field {
  position: relative;
  margin: 16px 0;
}

.floating-label-field input,
.floating-label-field select {
  width: 100%;
  padding: 18px 12px 8px 12px;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease;
}

.floating-label-field input:focus,
.floating-label-field select:focus {
  border-color: var(--accent);
}

.floating-label-field label {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  font-weight: 400;
  color: var(--muted);
  pointer-events: none;
  transition: all 0.2s ease;
  background: var(--surface-2);
  padding: 0 4px;
}

/* When focused or has value, move label up */
.floating-label-field input:focus + label,
.floating-label-field input:not(:placeholder-shown) + label,
.floating-label-field select:focus + label,
.floating-label-field select:not([value=""]) + label {
  top: 0;
  transform: translateY(-50%);
  font-size: 0.75rem;
  color: var(--accent);
}

/* For select with non-empty value (needs JS or different approach) */
.floating-label-field select:not(:invalid) + label {
  top: 0;
  transform: translateY(-50%);
  font-size: 0.75rem;
  color: var(--accent);
}

/* Disabled state */
.floating-label-field input:disabled,
.floating-label-field select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.floating-label-field input:disabled + label,
.floating-label-field select:disabled + label {
  color: var(--muted);
  opacity: 0.6;
}

/* Keep checkbox labels normal */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0;
  font-weight: 400;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  margin: 0;
}

/* Password toggle button */
.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  padding: 6px 10px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1.2rem;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.password-toggle:hover {
  background: rgba(79, 157, 255, 0.1);
  filter: none;
  border-color: transparent;
}

button {
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: filter 0.15s ease, border-color 0.15s ease;
}

button:hover {
  filter: brightness(1.12);
  border-color: rgba(79, 157, 255, 0.6);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Search results grid */
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.results-grid .dt-card {
  margin: 0;
}

.search-tutor-card {
  cursor: pointer;
}

.search-tutor-card:focus {
  outline: 2px solid rgba(79, 157, 255, 0.6);
  outline-offset: 2px;
}

/* Tutor business card */
.tutor-business-card {
  padding: 0;
  overflow: hidden;
}

.tutor-card-cover {
  height: 160px;
  background: #0b1224;
  position: relative;
  background-size: cover;
  background-position: center;
}

.tutor-card-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.0) 0%, rgba(2, 6, 23, 0.22) 100%);
  pointer-events: none;
}

.tutor-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.tutor-card-cover-blur {
  position: absolute;
  inset: 0;
  display: none;
}

.tutor-card-body {
  padding: 14px 16px 16px;
}

.tutor-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.tutor-card-identity {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.tutor-card-avatar-wrap {
  position: relative;
  width: 92px;
  height: 92px;
  margin-top: -54px;
  flex: 0 0 auto;
}

.tutor-card-avatar {
  width: 92px;
  height: 92px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.65);
  background: #0b0d12;
  object-fit: cover;
}

.tutor-card-avatar--placeholder {
  display: grid;
  place-items: center;
  background: rgba(79, 157, 255, 0.18);
  border-color: rgba(79, 157, 255, 0.45);
}

.tutor-card-namebox {
  padding-top: 4px;
  min-width: 0;
}

.tutor-card-name {
  font-weight: 900;
  font-size: 1.3rem;
  line-height: 1.15;
}

.tutor-card-headline {
  margin-top: 6px;
}

.tutor-card-city {
  margin-top: 6px;
}

.tutor-card-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tutor-card-mode {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(79, 157, 255, 0.35);
  background: rgba(79, 157, 255, 0.12);
  font-weight: 700;
}

.linkedin-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.25);
}

.linkedin-badge-in {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: #0a66c2;
  display: grid;
  place-items: center;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.linkedin-badge-check {
  color: var(--ok);
  font-weight: 900;
}

.tutor-card-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.tutor-card-message {
  margin-top: 10px;
  min-height: 1.4em;
}

/* Search map */
.dt-map {
  width: 100%;
  height: 479px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 14px;
  position: relative;
}

@media (max-width: 640px) {
  .dt-map {
    height: 260px;
  }
}

.dt-map .map-marker-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  clip-path: circle(50%);
  -webkit-clip-path: circle(50%);
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  background: rgba(15, 23, 42, 0.9);
  display: grid;
  place-items: center;
  padding: 0;
}

.dt-map .map-marker-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  clip-path: circle(50%);
  -webkit-clip-path: circle(50%);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #0b0d12;
  font-weight: 900;
  display: grid;
  place-items: center;
  padding: 0;
  margin: 0;
}

/* Search map marker fallback (image icon markers) */
#tutorMap .gm-style img[src*="tutorProfiles"],
#tutorMap .gm-style img[src*="profile.jpg"],
#tutorMap .gm-style img[src*="tutorProfiles%2F"] {
  border-radius: 50% !important;
  object-fit: cover;
  width: 48px !important;
  height: 48px !important;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  background: rgba(15, 23, 42, 0.9);
  display: block;
}

/* My Tutors list */
.my-tutors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.my-tutor-card {
  cursor: pointer;
}

.my-tutor-card:focus {
  outline: 2px solid rgba(79, 157, 255, 0.6);
  outline-offset: 2px;
}

.tutor-card-badges {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
}

@media (max-width: 520px) {
  .tutor-card-actions {
    grid-template-columns: 1fr;
  }
}

.dt-kv {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr;
  gap: 8px 16px;
  align-items: baseline;
}

.dt-kv > div:nth-child(odd) {
  font-weight: 500;
  color: var(--muted);
}

.dt-kv > div:nth-child(even) {
  color: var(--text);
}

/* Home cards */
.home-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 12px 0 18px;
}

.home-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  text-decoration: none;
  color: inherit;
}

.home-card:hover {
  text-decoration: none;
  filter: brightness(1.06);
}

.home-card-title {
  font-weight: 800;
  margin-bottom: 4px;
}

.home-card-desc {
  color: var(--muted);
  font-size: 0.95em;
}

/* Header partial styles */
#site-header { margin-bottom: 16px; }
#site-header .dt-header { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; }
#site-header .dt-brand { font-weight: 800; letter-spacing: 0.02em; }
#site-header nav { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; }
#site-header nav a { color: var(--text); padding: 8px 10px; border-radius: 999px; }
#site-header nav a:hover { background: rgba(79, 157, 255, 0.12); text-decoration: none; }
#site-header nav a.active, #site-header nav a[aria-current="page"] { background: rgba(79, 157, 255, 0.18); }

/* Footer */
.dt-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  margin-top: 60px;
  padding: 32px 20px 24px;
}

.dt-footer-content {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  text-align: center;
}

.dt-footer-brand {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dt-footer-brand-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

.dt-footer-brand-subtitle {
  font-size: 0.95rem;
  color: var(--muted);
}

.dt-footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: center;
}

.dt-footer-nav a {
  color: var(--muted);
  font-size: 0.95rem;
  transition: color 0.2s;
}

.dt-footer-nav a:hover {
  color: var(--accent);
}

.dt-footer-copy {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 8px;
/* Booking page: hide calendar sync warning */
#calendar-warning {
  display: none !important;
}
}

.dt-footer-copy p {
  margin: 0;
}

/* Legal pages */
.legal-page {
  max-width: 900px;
  margin: 0 auto;
}

.legal-page h1 {
  font-size: 2.2rem;
  margin-bottom: 8px;
}

.legal-page h2 {
  font-size: 1.5rem;
  margin-top: 32px;
  margin-bottom: 12px;
  color: var(--accent);
}

.legal-page h3 {
  font-size: 1.2rem;
  margin-top: 20px;
  margin-bottom: 10px;
}

.legal-page section {
  margin-bottom: 24px;
}

.legal-page p {
  line-height: 1.6;
  margin: 12px 0;
}

.legal-page ul {
  line-height: 1.7;
  margin: 12px 0;
  padding-left: 24px;
}

.legal-page li {
  margin: 8px 0;
}

.legal-page a {
  color: var(--accent);
  text-decoration: underline;
}

.legal-page a:hover {
  color: var(--text);
}

/* Responsive placeholders */
@media (max-width: 767px) {
  main { padding: 12px 12px 60px; }

  .dt-kv {
    grid-template-columns: auto 1fr;
  }

  .search-layout {
    grid-template-columns: 1fr;
  }

  .filters-panel { position: static; }

  .legal-page h1 {
    font-size: 1.8rem;
  }

  .legal-page h2 {
    font-size: 1.3rem;
  }

  .dt-footer {
    padding: 24px 16px 20px;
  }

  .dt-footer-nav {
    flex-direction: column;
    gap: 12px;
  }

  /* Booking form: prevent subject field overflow on mobile */
  #session-details-row > div {
    flex-direction: column;
    gap: 0.1rem;
  }

  #session-details-row > div > div {
    width: 100%;
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
  }

  #session-details-row select {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 767px) and (orientation: landscape) {
  /* phone landscape tweaks (placeholder) */
}

@media (min-width: 768px) and (max-width: 1024px) {
  /* iPad / small laptop tweaks (placeholder) */
}
