/* ============================================================
   TCHIN TCHIN — Component Classes
   Classes réutilisables extraites des templates existants.
   Chaque composant preserve la sophistication visuelle originale.
   ============================================================ */


/* ===================== UTILITIES ===================== */
.hidden { display: none !important; }
.mt-8 { margin-top: 8px; }


/* ===================== PHOTO PLACEHOLDERS ===================== */
/* Global fallback for broken/missing profile images.
   Applied via JS onerror handler or as a default background. */

.photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--cream-dark) 0%, var(--orange-light) 100%);
  color: var(--text-muted);
  overflow: hidden;
  position: relative;
}

.photo-placeholder::after {
  content: "";
  display: block;
  width: 40%;
  height: 40%;
  min-width: 24px;
  min-height: 24px;
  background-color: var(--text-muted);
  opacity: 0.35;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M7.5 6a4.5 4.5 0 1 1 9 0 4.5 4.5 0 0 1-9 0ZM3.751 20.105a8.25 8.25 0 0 1 16.498 0 .75.75 0 0 1-.437.695A18.683 18.683 0 0 1 12 22.5c-2.786 0-5.433-.608-7.812-1.7a.75.75 0 0 1-.437-.695Z' clip-rule='evenodd'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M7.5 6a4.5 4.5 0 1 1 9 0 4.5 4.5 0 0 1-9 0ZM3.751 20.105a8.25 8.25 0 0 1 16.498 0 .75.75 0 0 1-.437.695A18.683 18.683 0 0 1 12 22.5c-2.786 0-5.433-.608-7.812-1.7a.75.75 0 0 1-.437-.695Z' clip-rule='evenodd'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

/* Small avatar variant (navbar, lists) */
.photo-placeholder--sm {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

/* Medium avatar variant (cards, interests) */
.photo-placeholder--md {
  width: 56px;
  height: 56px;
  border-radius: 50%;
}

/* Large card variant (feed cards, detail hero) */
.photo-placeholder--card {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

/* My-announcements card variant (horizontal layout, small thumbnail) */
.photo-placeholder--my-card {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

/* Thumbnail variant (profile photo grid) */
.photo-placeholder--thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  cursor: pointer;
}

/* Carousel slide variant */
.photo-placeholder--slide {
  width: 100%;
  height: 100%;
}

/* Dark mode: brighter gradient so placeholder is visible */
html[data-theme="dark"] .photo-placeholder {
  background: linear-gradient(135deg, #2E2A28 0%, #3D2A1F 60%, #4A3020 100%);
}
html[data-theme="dark"] .photo-placeholder::after {
  background-color: #FF8347;
  opacity: 0.2;
}

/* ===================== BUTTONS ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-sans);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: var(--radius-full);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Primary — Orange vibrant */
.btn-primary {
  background: var(--orange);
  color: #FFFFFF;
  padding: 12px 28px;
  font-size: 15px;
}

.btn-primary:hover {
  background: var(--orange-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--orange-glow);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Secondary — Bordered subtle */
.btn-secondary {
  background: var(--white);
  color: var(--text-primary);
  border: 1.5px solid var(--border);
  padding: 12px 28px;
  font-size: 15px;
}

html[data-theme="dark"] .btn-secondary {
  background: var(--bg-elevated);
  border-color: var(--border);
  color: var(--text-primary);
}

.btn-secondary:hover {
  border-color: var(--orange);
  color: var(--orange);
}

/* Danger — Red */
.btn-danger {
  background: var(--red);
  color: #FFFFFF;
  padding: 12px 28px;
  font-size: 15px;
}

.btn-danger:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

/* Ghost — Text only */
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 16px;
  font-size: 14px;
}

.btn-ghost:hover {
  color: var(--orange);
  background: var(--orange-light);
}

/* Small variant */
.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

.btn-sm svg {
  width: 14px;
  height: 14px;
}

/* Icon-only circular button */
.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
}

.btn-icon:hover {
  border-color: var(--orange);
  color: var(--orange);
  background: var(--orange-light);
}

/* Section edit button — profile sections */
.section-edit-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 5px 14px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: var(--font-sans);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
}

.section-edit-btn:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.section-edit-btn svg {
  width: 14px;
  height: 14px;
}


/* ===================== FORMS ===================== */
.form-group {
  margin-bottom: 18px;
  min-width: 0; /* Prevent grid children from overflowing their container */
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-sm);
}

.form-label .optional {
  font-weight: 400;
  text-transform: none;
  color: var(--text-muted);
}

.form-input {
  width: 100%;
  max-width: 100%; /* Prevent native inputs (date, etc.) from overflowing on mobile */
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  color: var(--text-primary);
  background: var(--white);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 107, 44, 0.1);
}

html[data-theme="dark"] .form-input:focus {
  box-shadow: 0 0 0 3px rgba(255, 131, 71, 0.2);
}

/* Dark mode form inputs */
html[data-theme="dark"] .form-input {
  background: var(--bg-elevated);
  border-color: var(--border-input);
  color: var(--text-primary);
}

html[data-theme="dark"] .form-input::placeholder {
  color: var(--text-hint);
}

/* Dark mode autofill override (Chrome/Safari paint autofilled inputs white) */
html[data-theme="dark"] .form-input:-webkit-autofill,
html[data-theme="dark"] .form-input:-webkit-autofill:hover,
html[data-theme="dark"] .form-input:-webkit-autofill:focus,
html[data-theme="dark"] .form-input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 30px var(--bg-elevated, #2A2A2E) inset !important;
  box-shadow: 0 0 0 30px var(--bg-elevated, #2A2A2E) inset !important;
  -webkit-text-fill-color: var(--text-primary, #F0F0F0) !important;
  border-color: var(--border-input, #555559) !important;
  transition: background-color 5000s ease-in-out 0s;
}

/* ===================== TIME PICKER (native selects) ===================== */
.time-picker-group {
  display: flex;
  align-items: center;
  background: var(--bg-surface, #fff);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 48px;
  position: relative;
}

.time-select {
  flex: 1;
  height: 100%;
  border: none;
  background: transparent;
  font-size: 1.1rem;
  font-weight: 600;
  font-family: var(--font-sans);
  color: var(--text-primary);
  text-align: center;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding: 0 8px;
  outline: none;
}

.time-select:focus {
  background: rgba(255, 107, 44, 0.08);
}

.time-sep {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 0 2px;
  user-select: none;
  flex-shrink: 0;
}

/* Dark mode */
html[data-theme="dark"] .time-picker-group {
  background: var(--bg-elevated);
  border-color: var(--border-input);
}

html[data-theme="dark"] .time-select {
  color: var(--text-primary);
  background: transparent;
}

html[data-theme="dark"] .time-select:focus {
  background: rgba(255, 107, 44, 0.12);
}

html[data-theme="dark"] .time-sep {
  color: var(--text-muted);
}

/* Date & time picker dark mode */
html[data-theme="dark"] input[type="date"],
html[data-theme="dark"] input[type="time"] {
  color: var(--text-primary);
  background: var(--bg-elevated);
  border-color: var(--border-input);
  color-scheme: dark;
}

html[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0;
  width: 20px;
  height: 20px;
}

html[data-theme="dark"] input[type="time"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0;
  width: 20px;
  height: 20px;
}

html[data-theme="dark"] input[type="date"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%23bbbbbb' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
}

html[data-theme="dark"] input[type="time"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%23bbbbbb' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolyline points='12 6 12 12 16 14'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
}

/* Textarea */
.form-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  color: var(--text-primary);
  background: var(--white);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  resize: vertical;
  min-height: 100px;
  line-height: 1.5;
}

.form-textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 107, 44, 0.1);
}

html[data-theme="dark"] .form-textarea {
  background: var(--bg-elevated);
  border-color: var(--border-input);
  color: var(--text-primary);
}

/* Hint & error text */
.form-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: var(--space-xs);
}

.form-error {
  font-size: 0.78rem;
  color: var(--red);
  margin-top: var(--space-xs);
}

/* Error banner */
.form-errors-banner {
  background: var(--red-light);
  border: 1px solid var(--red);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  font-size: 0.88rem;
  color: var(--red);
}

.form-errors-banner svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Section title (form sections) */
.form-section-title {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
}

html[data-theme="dark"] .form-section-title {
  color: var(--text-secondary);
}

html[data-theme="dark"] .form-label {
  color: var(--text-primary);
}

html[data-theme="dark"] .form-label .optional {
  color: var(--text-hint);
}


/* ===================== CARDS ===================== */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: box-shadow 0.3s;
}

.card:hover {
  box-shadow: var(--shadow-hover);
}

.card-body {
  padding: var(--space-xl);
}

/* Form card (wraps forms) */
.form-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
}

html[data-theme="dark"] .form-card {
  background: var(--bg-overlay);
  border-color: var(--border-subtle);
}

/* Profile section card */
.profile-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  margin-bottom: var(--space-lg);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
}

.section-title {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}


/* ===================== BADGES ===================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-primary {
  background: var(--orange-light);
  color: var(--orange);
}

.badge-success {
  background: var(--green-light);
  color: var(--green);
}

.badge-danger {
  background: var(--red-light);
  color: var(--red);
}

.badge-info {
  background: var(--blue-light);
  color: var(--blue);
}

.badge-muted {
  background: var(--cream-dark);
  color: var(--text-secondary);
}

.badge-gold {
  background: var(--gold-light);
  color: var(--gold);
}

/* Status dot (compact indicator) */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.status-dot-success { background: var(--green); }
.status-dot-danger  { background: var(--red); }
.status-dot-warning { background: var(--gold); }
.status-dot-info    { background: var(--blue); }


/* ===================== MODALS ===================== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: var(--z-modal);
  align-items: flex-end;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.modal-sheet {
  background: var(--white);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: var(--space-xl);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.modal-handle {
  width: 36px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 0 auto var(--space-lg);
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: var(--space-sm);
}

.modal-subtitle {
  font-size: 0.88rem;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.5;
  margin-bottom: var(--space-xl);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s;
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-actions {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
}

.modal-actions .btn {
  flex: 1;
  justify-content: center;
}

/* Desktop: centered modal instead of bottom sheet */
@media (min-width: 640px) {
  .modal-overlay {
    align-items: center;
  }

  .modal-sheet {
    border-radius: var(--radius-lg);
    animation: fadeIn 0.2s ease;
  }

  @keyframes fadeIn {
    from { transform: scale(0.95); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
  }
}


/* ===================== EMPTY STATES ===================== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  background: var(--cream-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty-state-icon svg {
  width: 28px;
  height: 28px;
  color: var(--text-secondary);
}

.empty-state-emoji {
  font-size: 48px;
  margin-bottom: 16px;
  display: block;
}

.empty-state-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.empty-state-text {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 320px;
  margin: 0 auto 20px;
}

.empty-state-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  background: var(--orange);
  color: #FFFFFF;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.empty-state-btn:hover {
  background: var(--orange-hover);
  transform: translateY(-1px);
}

.empty-state-btn svg {
  width: 16px;
  height: 16px;
}


/* ===================== TAGS (date types, etc.) ===================== */
.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
}

.tag-type {
  background: var(--orange);
  color: #FFFFFF;
}

.tag-time,
.tag-venue {
  background: var(--cream-dark);
  color: var(--text-secondary);
}


/* ===================== BACK LINK ===================== */
.back-link {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 6px;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: all 0.2s;
  margin: var(--space-sm) 0;
}

.back-link:hover {
  color: var(--orange);
  border-color: var(--orange);
}

.back-link svg {
  width: 16px;
  height: 16px;
}


/* ===================== DIVIDER ===================== */
.divider {
  height: 1px;
  background: var(--border);
  margin: var(--space-lg) 0;
}


/* ===================== PHOTO PROTECTION ===================== */
/* Prevent casual photo downloading (right-click, drag, long-press) */
.card-photo,
.photo-main,
.photo-slide img,
.creator-avatar,
.date-card-photo,
.interest-photo {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  pointer-events: none;
}

/* Re-enable pointer events on parent containers that need clicks */
.card-photo-section,
.photo-carousel,
.photo-main-wrap {
  pointer-events: auto;
}

/* ===================== PHOTO UTILITIES ===================== */
.avatar-sm  { width: 32px;  height: 32px;  border-radius: 50%; object-fit: cover; }
.avatar-md  { width: 40px;  height: 40px;  border-radius: 50%; object-fit: cover; }
.avatar-lg  { width: 52px;  height: 52px;  border-radius: 50%; object-fit: cover; }
.avatar-xl  { width: 64px;  height: 64px;  border-radius: 50%; object-fit: cover; }

.avatar-bordered {
  border: 2px solid var(--orange-light);
}


/* ===================== UTILITIES ===================== */
.text-primary   { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted     { color: var(--text-muted); }
.text-orange    { color: var(--orange); }
.text-green     { color: var(--green); }
.text-red       { color: var(--red); }

.font-serif     { font-family: var(--font-serif); }
.font-sans      { font-family: var(--font-sans); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   MOBILE BOTTOM NAV
   ========================================================================== */

.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: var(--white);
  border-top: 1px solid var(--border);
  z-index: 200;
  align-items: center;
  justify-content: space-around;
  padding: 4px 8px env(safe-area-inset-bottom, 0px);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 0;
  min-width: 52px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2px;
  transition: color 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.bottom-nav-item svg {
  width: 22px;
  height: 22px;
}

.bottom-nav-item.active {
  color: var(--orange);
  font-weight: 600;
}

.bottom-nav-item:active {
  transform: scale(0.92);
}

.bottom-nav-create-icon {
  width: 44px;
  height: 44px;
  background: var(--orange);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -18px;
  box-shadow: 0 4px 12px rgba(255, 107, 44, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}

.bottom-nav-create-icon svg {
  width: 22px;
  height: 22px;
  color: white;
  stroke: white;
}

.bottom-nav-create:active .bottom-nav-create-icon {
  transform: scale(0.92);
  box-shadow: 0 2px 8px rgba(255, 107, 44, 0.3);
}

.bottom-nav-create span {
  margin-top: -2px;
}

html[data-theme="dark"] .bottom-nav {
  background: var(--white);
  border-top-color: var(--border);
}

html[data-theme="dark"] .bottom-nav-create-icon {
  box-shadow: 0 4px 12px rgba(255, 131, 71, 0.3);
}

@media (max-width: 700px) {
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }
  .bottom-nav {
    display: flex;
  }
  .navbar-nav {
    display: none !important;
  }
  .navbar-create-btn {
    display: none !important;
  }
  .main-layout {
    padding-bottom: 72px;
  }
  body {
    padding-bottom: 72px;
  }
}


/* ===================== PAGE LAYOUT (Consolidated from templates) ===================== */
.page {
  padding-top: 12px;
  padding-bottom: 120px;
  min-height: 100vh;
}

.page-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Narrow variant for forms (create, edit, profile) */
.page-inner--narrow {
  max-width: 640px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 20px;
}

.page-title {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.page-subtitle {
  font-size: 15px;
  color: var(--text-muted);
  margin: 0;
}

.page-stats {
  display: flex;
  gap: 16px;
}

.page-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  margin-bottom: var(--space-lg);
  transition: color 0.2s;
}

.page-back:hover {
  color: var(--orange);
}

.page-back svg {
  width: 16px;
  height: 16px;
}

html[data-theme="dark"] .page-subtitle {
  color: var(--text-secondary);
}

html[data-theme="dark"] .page-back {
  color: var(--text-secondary);
}

html[data-theme="dark"] .page-back:hover {
  color: var(--orange);
}


/* ===================== ANNOUNCEMENT CARDS (Consolidated from templates) ===================== */
.stat-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
}

.stat-badge.active {
  background: var(--green-light);
  color: var(--green);
}

.stat-badge.matched {
  background: var(--blue-light);
  color: var(--blue);
}

.stat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}


/* ===================== DATE CARDS (Consolidated from my_dates.html) ===================== */
.date-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 16px;
  transition: box-shadow 0.2s;
}

.date-card:hover {
  box-shadow: var(--shadow-md);
}

.date-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.date-card-photo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--orange-light);
  flex-shrink: 0;
}

.date-card-info {
  flex: 1;
}

.date-card-name {
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.date-card-age {
  font-size: 18px;
  font-weight: 400;
  color: var(--text-secondary);
  margin-left: 6px;
}

.date-card-city {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.date-card-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.date-card-status.upcoming {
  background: var(--orange-light);
  color: var(--orange);
}

.date-card-status.completed {
  background: var(--green-light);
  color: var(--green);
}

.date-card-status.cancelled {
  background: var(--red-light);
  color: var(--red);
}

.date-details {
  background: var(--cream);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 20px;
}

.date-details-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-primary);
}

.date-details-row + .date-details-row {
  margin-top: 10px;
}

.date-details-icon {
  font-size: 16px;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.date-details-label {
  font-weight: 500;
}

.date-details-value {
  color: var(--text-secondary);
  margin-left: auto;
}

.date-countdown {
  color: var(--orange);
  font-weight: 600;
}


/* ===================== FORM SECTION (Consolidated from create.html/edit.html) ===================== */
.form-section {
  margin-bottom: 28px;
}

.form-section:last-child {
  margin-bottom: 0;
}

.form-divider {
  height: 1px;
  background: var(--border);
  margin: 28px 0;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-input.has-error {
  border-color: var(--red);
}

textarea.form-input {
  resize: vertical;
  min-height: 100px;
}

.form-actions {
  margin-top: 32px;
  display: flex;
  gap: 12px;
}


/* ===================== DATE TYPE SELECTOR (Consolidated from create.html/edit.html) ===================== */
.date-type-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.date-type-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 8px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--white);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.date-type-option:hover {
  border-color: var(--orange);
  background: var(--orange-light);
}

.date-type-option.selected {
  border-color: var(--orange);
  background: var(--orange-light);
  box-shadow: 0 0 0 1px var(--orange);
}

.date-type-emoji {
  font-size: 28px;
  line-height: 1;
}

.date-type-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.date-type-option.selected .date-type-label {
  color: var(--orange);
}

.date-type-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

html[data-theme="dark"] .date-type-option {
  background: var(--bg-elevated);
  border-color: var(--border);
}

html[data-theme="dark"] .date-type-option:hover {
  border-color: var(--orange);
  background: var(--orange-light);
}

html[data-theme="dark"] .date-type-option:hover {
  background: var(--orange-light);
}


/* ===================== PHOTO CAROUSEL (Consolidated from detail.html) ===================== */
.photo-carousel {
  width: 100%;
  aspect-ratio: 4/5;
  position: relative;
  overflow: hidden;
  background: var(--cream-dark);
  border-radius: var(--radius-lg);
}

.photo-track {
  display: flex;
  height: 100%;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.photo-slide {
  flex: 0 0 100%;
  height: 100%;
}

.photo-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-progress {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  gap: 3px;
  z-index: 10;
}

.progress-seg {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.35);
  overflow: hidden;
  cursor: pointer;
}

.progress-seg.done .progress-fill,
.progress-seg.active .progress-fill {
  width: 100%;
}

.progress-fill {
  width: 0;
  height: 100%;
  border-radius: 2px;
  background: white;
  transition: width 0.3s;
}

.tap-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40%;
  z-index: 5;
  cursor: pointer;
}

.tap-zone.left {
  left: 0;
}

.tap-zone.right {
  right: 0;
}

.photo-identity {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55) 0%, transparent 100%);
  padding: 60px 20px 18px;
  z-index: 8;
}

.identity-name {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 700;
  color: white;
  display: flex;
  align-items: center;
}

.identity-age {
  font-family: var(--font-sans);
  font-size: 24px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.85);
  margin-left: 6px;
}

.identity-verified {
  width: 22px;
  height: 22px;
  background: var(--blue);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
}

.identity-verified svg {
  width: 12px;
  height: 12px;
  color: white;
}

.identity-city {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 4px;
}


/* ===================== CONTACT/PHONE DISPLAY (Consolidated from my_dates.html) ===================== */
.contacts-section {
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.contacts-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.contacts-title .lock-icon {
  color: var(--green);
}

.phone-display {
  background: var(--cream);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 14px;
}

.phone-number-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.phone-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.phone-number {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-primary);
  font-family: var(--font-sans);
}

.phone-reveal-btn {
  margin-left: auto;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border);
  background: var(--white);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.phone-reveal-btn:hover {
  border-color: var(--orange);
  color: var(--orange);
  background: var(--orange-light);
}

.phone-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
}

.contact-actions {
  display: flex;
  gap: 8px;
}

.contact-action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--text-primary);
}

.contact-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.contact-action-btn.copy-btn:hover {
  border-color: var(--orange);
  background: var(--orange-light);
  color: var(--orange);
}

.contact-action-btn.whatsapp-btn {
  background: #25D366;
  border-color: #25D366;
  color: white;
}

.contact-action-btn.whatsapp-btn:hover {
  background: #1DA851;
  border-color: #1DA851;
}

.contact-action-btn.sms-btn {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
}

.contact-action-btn.sms-btn:hover {
  background: #2563EB;
  border-color: #2563EB;
}

.contact-action-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.copy-feedback {
  font-size: 12px;
  color: var(--green);
  font-weight: 600;
  display: none;
  margin-top: 8px;
  text-align: center;
}


/* ===================== ROLE BADGES (Consolidated from my_dates.html) ===================== */
.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  margin-left: 8px;
}

.role-badge.creator {
  background: var(--blue-light);
  color: var(--blue);
}

.role-badge.responder {
  background: var(--orange-light);
  color: var(--orange);
}


/* ===================== BLOCK MODAL (Consolidated from detail.html/my_dates.html) ===================== */
.block-modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.15);
  transform: scale(0.95);
  transition: transform 0.3s;
}

.modal-overlay.active .block-modal {
  transform: scale(1);
}

.block-modal-emoji {
  font-size: 36px;
  text-align: center;
  margin-bottom: 8px;
}

.block-modal-title {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 4px;
}

.block-modal-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 22px;
  line-height: 1.5;
}

.block-reasons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.reason-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--cream);
  border-radius: 12px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
  font-size: 14px;
  font-family: var(--font-sans);
}

.reason-checkbox:hover {
  border-color: var(--border);
}

.reason-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--red);
  flex-shrink: 0;
}

.reason-checkbox input[type="checkbox"]:checked ~ span {
  color: var(--red);
  font-weight: 600;
}

.block-comment {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-family: var(--font-sans);
  font-size: 14px;
  resize: none;
  margin-bottom: 16px;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.block-comment:focus {
  outline: none;
  border-color: var(--red);
}

.block-modal-actions {
  display: flex;
  gap: 10px;
}

.block-modal-btn {
  flex: 1;
  padding: 14px;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.block-modal-btn.cancel {
  background: var(--cream);
  color: var(--text-secondary);
}

.block-modal-btn.cancel:hover {
  background: var(--cream-dark);
}

.block-modal-btn.danger {
  background: var(--red);
  color: white;
}

.block-modal-btn.danger:hover {
  background: #c53030;
}

.block-modal-btn.danger:disabled {
  background: var(--border);
  cursor: not-allowed;
}


/* ===================== RESPONSIVE OVERRIDES ===================== */
@media (max-width: 640px) {
  .page {
    padding-top: 4px;
    padding-bottom: 80px;
  }

  .page-inner {
    padding: 0 16px;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-bottom: 8px;
  }

  .page-title {
    font-size: 22px;
  }

  .form-card {
    padding: 24px 20px;
  }

  .date-type-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .form-actions {
    flex-direction: column-reverse;
  }

  .form-actions .btn-primary {
    width: 100%;
  }

  .date-card {
    padding: 16px;
  }

  .date-card-header {
    gap: 12px;
  }

  .date-card-photo {
    width: 52px;
    height: 52px;
  }

  .photo-placeholder--my-card {
    width: 100%;
    height: 160px;
    border-radius: var(--radius-md);
  }

  .identity-name {
    font-size: 26px;
  }
}
