/* ============================================================
   TravelCMS Pro — Tours Module Styles
   tours.css
   ============================================================ */

/* ── Tours List Page ───────────────────────────────────────── */
.tours-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid #f0f4f8;
  flex-wrap: wrap;
}
.tours-toolbar .search-box {
  position: relative;
  flex: 1;
  min-width: 220px;
  max-width: 340px;
}
.tours-toolbar .search-box .si {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  font-size: 14px; opacity: .38;
  pointer-events: none;
}
.tours-toolbar .search-box input {
  width: 100%;
  padding: 9px 14px 9px 36px;
  border: 1.5px solid #e4ecf2;
  border-radius: 9px;
  font-size: 13.5px;
  background: #f6f9fc;
  outline: none;
  font-family: 'DM Sans', sans-serif;
  color: var(--dark);
  transition: border-color .2s, background .2s;
}
.tours-toolbar .search-box input:focus {
  border-color: var(--brand);
  background: white;
}
.filter-select {
  padding: 9px 32px 9px 12px;
  border: 1.5px solid #e4ecf2;
  border-radius: 9px;
  font-size: 13px;
  color: var(--text-soft);
  background: #f6f9fc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238a9bb0' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  -webkit-appearance: none;
  outline: none;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: border-color .2s;
}
.filter-select:focus { border-color: var(--brand); }

.view-toggle {
  display: flex;
  border: 1.5px solid #e4ecf2;
  border-radius: 9px;
  overflow: hidden;
}
.view-toggle button {
  width: 36px; height: 36px;
  border: none;
  background: white;
  font-size: 16px;
  cursor: pointer;
  color: var(--text-muted);
  transition: all .15s;
}
.view-toggle button.active {
  background: var(--brand);
  color: white;
}

/* Tour Cards Grid */
.tours-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  padding: 20px;
}
.tour-card {
  background: white;
  border-radius: 14px;
  border: 1px solid #edf2f7;
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  cursor: pointer;
}
.tour-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.09);
}
.tour-card-img {
  height: 175px;
  background: linear-gradient(135deg, #1A6B8A 0%, #0e3f53 100%);
  position: relative;
  overflow: hidden;
}
.tour-card-img .img-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.5) 0%, transparent 60%);
}
.tour-card-img .img-emoji {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-56%);
  font-size: 52px; opacity: .35;
}
.tour-card-img .card-badges {
  position: absolute; top: 10px; left: 10px;
  display: flex; gap: 6px;
}
.card-badge {
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 10.5px;
  font-weight: 700;
  font-family: 'Sora', sans-serif;
}
.card-badge.featured  { background: var(--accent); color: white; }
.card-badge.hot-deal  { background: var(--danger); color: white; }
.card-badge.new-badge { background: var(--success); color: white; }
.card-badge.draft     { background: #8a9bb0; color: white; }
.card-badge.inactive  { background: #dce4ed; color: #5a6a7e; }

.tour-card-img .card-status-dot {
  position: absolute; top: 10px; right: 10px;
  width: 9px; height: 9px;
  border-radius: 50%;
  border: 2px solid white;
}
.tour-card-img .card-status-dot.active   { background: var(--success); }
.tour-card-img .card-status-dot.inactive { background: #8a9bb0; }
.tour-card-img .card-status-dot.draft    { background: var(--warn); }

.tour-card-body { padding: 14px 16px; }
.tour-card-title {
  font-family: 'Sora', sans-serif;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tour-card-meta {
  display: flex; align-items: center; gap: 12px;
  font-size: 12px; color: var(--text-muted); margin-bottom: 10px;
}
.tour-card-meta span { display: flex; align-items: center; gap: 4px; }
.tour-card-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 12px; }
.tag-chip {
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  background: var(--lt-blue);
  color: var(--brand);
}
.tour-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid #f3f6fa;
}
.tour-price {
  font-family: 'Sora', sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: var(--brand);
}
.tour-price .per { font-size: 11px; font-weight: 500; color: var(--text-muted); }
.card-actions { display: flex; gap: 5px; }
.icon-btn {
  width: 30px; height: 30px;
  border: 1.5px solid #e4ecf2;
  border-radius: 7px;
  background: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  cursor: pointer;
  transition: all .15s;
}
.icon-btn:hover { border-color: var(--brand); background: var(--lt-blue); }
.icon-btn.danger:hover { border-color: var(--danger); background: #fde8e8; }

/* Tours Table (list view) */
.tours-table-wrap { padding: 0 20px 20px; }

/* ── Tour Add/Edit Form Page ───────────────────────────────── */
.form-page-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  align-items: start;
}

/* Section Card */
.form-section {
  background: white;
  border-radius: 14px;
  border: 1px solid #edf2f7;
  margin-bottom: 18px;
  overflow: hidden;
}
.form-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid #f3f6fa;
  cursor: pointer;
  user-select: none;
}
.form-section-header .sec-icon {
  width: 36px; height: 36px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}
.form-section-header .sec-title {
  font-family: 'Sora', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--dark);
  flex: 1;
}
.form-section-header .sec-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 1px;
}
.form-section-header .toggle-arrow {
  font-size: 12px;
  color: var(--text-muted);
  transition: transform .2s;
}
.form-section-header.collapsed .toggle-arrow { transform: rotate(-90deg); }
.form-section-body { padding: 20px; }
.form-section-body.hidden { display: none; }

/* Two-col form row */
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* Rich text area */
.rich-textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px 14px;
  border: 1.5px solid #dce4ed;
  border-radius: 9px;
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  color: var(--dark);
  background: #f8fafc;
  outline: none;
  resize: vertical;
  transition: border-color .2s, background .2s;
  line-height: 1.6;
}
.rich-textarea:focus { border-color: var(--brand); background: white; }

/* Toolbar for fake rich text */
.editor-toolbar {
  display: flex;
  gap: 2px;
  padding: 8px 10px;
  background: #f6f9fc;
  border: 1.5px solid #dce4ed;
  border-bottom: none;
  border-radius: 9px 9px 0 0;
  flex-wrap: wrap;
}
.editor-toolbar button {
  width: 28px; height: 28px;
  border: none;
  border-radius: 5px;
  background: transparent;
  font-size: 13px;
  cursor: pointer;
  color: var(--text-soft);
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
  font-family: serif;
  font-weight: 700;
}
.editor-toolbar button:hover { background: #dce4ed; color: var(--dark); }
.editor-toolbar .sep { width: 1px; background: #dce4ed; margin: 4px 4px; align-self: stretch; }
.editor-toolbar + .rich-textarea { border-radius: 0 0 9px 9px; }

/* Itinerary Builder */
.itinerary-list { display: flex; flex-direction: column; gap: 10px; }
.itinerary-day {
  border: 1.5px solid #e4ecf2;
  border-radius: 11px;
  overflow: hidden;
  background: white;
}
.itinerary-day-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #f8fafc;
  border-bottom: 1px solid #f0f4f8;
  cursor: grab;
}
.itinerary-day-header:active { cursor: grabbing; }
.drag-handle { color: #b0bec5; font-size: 16px; cursor: grab; }
.day-number {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--brand);
  color: white;
  font-size: 12px;
  font-weight: 700;
  font-family: 'Sora', sans-serif;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.day-title-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--dark);
  font-family: 'DM Sans', sans-serif;
  outline: none;
}
.itinerary-day-body { padding: 14px; }
.itinerary-day-body textarea {
  width: 100%;
  min-height: 80px;
  border: 1.5px solid #e4ecf2;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13.5px;
  font-family: 'DM Sans', sans-serif;
  color: var(--dark);
  background: #fafbfd;
  outline: none;
  resize: vertical;
}
.itinerary-day-body textarea:focus { border-color: var(--brand); background: white; }
.day-meals {
  display: flex; gap: 8px; margin-top: 10px;
}
.meal-check {
  display: flex; align-items: center; gap: 5px;
  padding: 5px 10px;
  border: 1.5px solid #e4ecf2;
  border-radius: 7px;
  font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all .15s;
}
.meal-check input { display: none; }
.meal-check.checked { border-color: var(--success); background: #e8f8ef; color: var(--success); }

/* Pricing Tiers */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.pricing-tier {
  border: 1.5px solid #e4ecf2;
  border-radius: 11px;
  padding: 16px;
  text-align: center;
  transition: border-color .2s;
}
.pricing-tier:focus-within { border-color: var(--brand); }
.pricing-tier .tier-icon { font-size: 24px; margin-bottom: 8px; }
.pricing-tier .tier-label {
  font-size: 12px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .8px; margin-bottom: 10px;
}
.pricing-tier input {
  width: 100%;
  text-align: center;
  padding: 9px 12px;
  border: 1.5px solid #e4ecf2;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  font-family: 'Sora', sans-serif;
  color: var(--brand);
  background: #f8fafc;
  outline: none;
  transition: border-color .2s;
}
.pricing-tier input:focus { border-color: var(--brand); background: white; }
.pricing-tier .tier-note { font-size: 11px; color: var(--text-muted); margin-top: 6px; }

/* Departure Schedule */
.departure-list { display: flex; flex-direction: column; gap: 8px; }
.departure-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1.5px solid #e4ecf2;
  border-radius: 9px;
}
.departure-row input, .departure-row select {
  padding: 7px 10px;
  border: 1.5px solid #dce4ed;
  border-radius: 7px;
  font-size: 13px;
  font-family: 'DM Sans', sans-serif;
  background: white;
  outline: none;
  color: var(--dark);
}
.departure-row input:focus, .departure-row select:focus { border-color: var(--brand); }

/* Inclusion / Exclusion */
.inc-exc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.inc-exc-panel {
  border: 1.5px solid #e4ecf2;
  border-radius: 11px;
  overflow: hidden;
}
.inc-exc-panel .panel-head {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  font-size: 13px; font-weight: 700;
  border-bottom: 1px solid #f0f4f8;
}
.inc-exc-panel .panel-head.inc { background: #f0fbf4; color: var(--success); }
.inc-exc-panel .panel-head.exc { background: #fef0f0; color: var(--danger); }
.inc-exc-panel .panel-items { padding: 10px 14px; display: flex; flex-direction: column; gap: 6px; }
.inc-exc-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--dark);
}
.inc-exc-item .remove-btn {
  margin-left: auto; background: none; border: none;
  color: #b0bec5; cursor: pointer; font-size: 14px; padding: 0 2px;
  transition: color .15s;
}
.inc-exc-item .remove-btn:hover { color: var(--danger); }
.add-item-row {
  display: flex; gap: 6px; padding: 8px 14px 12px;
  border-top: 1px solid #f0f4f8;
}
.add-item-row input {
  flex: 1; padding: 7px 10px;
  border: 1.5px solid #e4ecf2; border-radius: 7px;
  font-size: 13px; font-family: 'DM Sans', sans-serif;
  background: #f8fafc; outline: none;
}
.add-item-row input:focus { border-color: var(--brand); background: white; }
.add-item-row button {
  padding: 7px 12px; border-radius: 7px; font-size: 12px; font-weight: 600;
  border: none; cursor: pointer; font-family: 'DM Sans', sans-serif; transition: all .15s;
}

/* Photo Upload */
.photo-upload-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}
.photo-slot {
  aspect-ratio: 4/3;
  border: 2px dashed #d0dce8;
  border-radius: 10px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  cursor: pointer; transition: all .18s;
  position: relative; overflow: hidden;
  background: #f8fafc;
}
.photo-slot:hover { border-color: var(--brand); background: var(--lt-blue); }
.photo-slot .upload-icon { font-size: 24px; opacity: .45; }
.photo-slot .upload-label { font-size: 11px; color: var(--text-muted); margin-top: 6px; font-weight: 500; }
.photo-slot.filled { border-style: solid; border-color: #e4ecf2; }
.photo-slot.filled .photo-emoji {
  font-size: 42px; position: absolute;
  top: 50%; left: 50%; transform: translate(-50%, -58%);
}
.photo-slot.filled .photo-remove {
  position: absolute; top: 6px; right: 6px;
  width: 22px; height: 22px;
  background: rgba(0,0,0,.5); color: white;
  border-radius: 50%; border: none; cursor: pointer;
  font-size: 11px; display: flex; align-items: center; justify-content: center;
}
.photo-slot.filled .photo-label-tag {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: rgba(0,0,0,.5); color: white;
  font-size: 10px; font-weight: 600; padding: 4px 6px;
  text-align: center;
}

/* Category / Tag Selector */
.category-grid {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.cat-chip {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border: 1.5px solid #e4ecf2;
  border-radius: 8px;
  font-size: 12.5px; font-weight: 600;
  cursor: pointer; transition: all .15s;
  user-select: none;
}
.cat-chip input { display: none; }
.cat-chip.selected { border-color: var(--brand); background: var(--lt-blue); color: var(--brand); }
.cat-chip:hover:not(.selected) { border-color: #b0c4d4; }

/* Amenity / Extras checkbox grid */
.checkbox-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 8px;
}
.check-item {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 12px;
  border: 1.5px solid #e4ecf2; border-radius: 8px;
  cursor: pointer; transition: all .15s; font-size: 13px; font-weight: 500;
  user-select: none;
}
.check-item input[type=checkbox] { accent-color: var(--brand); width: 15px; height: 15px; flex-shrink: 0; cursor: pointer; }
.check-item:has(input:checked) { border-color: var(--brand); background: var(--lt-blue); color: var(--brand); }

/* Sidebar sticky panel */
.form-sidebar { position: sticky; top: calc(var(--topbar-h) + 20px); display: flex; flex-direction: column; gap: 16px; }
.sidebar-panel {
  background: white; border: 1px solid #edf2f7;
  border-radius: 14px; overflow: hidden;
}
.sidebar-panel-header {
  padding: 13px 16px;
  border-bottom: 1px solid #f3f6fa;
  font-family: 'Sora', sans-serif;
  font-size: 13.5px; font-weight: 700; color: var(--dark);
  display: flex; align-items: center; gap: 8px;
}
.sidebar-panel-body { padding: 14px 16px; }

/* Status Toggle */
.status-toggle {
  display: flex; border: 1.5px solid #e4ecf2; border-radius: 9px; overflow: hidden;
  margin-bottom: 14px;
}
.status-toggle button {
  flex: 1; padding: 9px 6px; border: none; font-size: 12.5px; font-weight: 600;
  font-family: 'DM Sans', sans-serif; cursor: pointer; transition: all .15s;
  background: white; color: var(--text-muted);
}
.status-toggle button.active-btn { background: var(--success); color: white; }
.status-toggle button.inactive-btn.active-btn { background: #8a9bb0; }
.status-toggle button.draft-btn.active-btn { background: var(--warn); }

/* Tour flags */
.tour-flags { display: flex; flex-direction: column; gap: 8px; }
.flag-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px; border: 1.5px solid #e4ecf2; border-radius: 8px;
  font-size: 13px; font-weight: 500; cursor: pointer; transition: all .15s;
}
.flag-item:has(.toggle-sw:checked) { border-color: var(--accent); background: #fff9f0; }
.toggle-sw { position: relative; width: 36px; height: 20px; }
.toggle-sw input { opacity: 0; width: 0; height: 0; }
.toggle-sw .slider {
  position: absolute; cursor: pointer; inset: 0;
  background: #dce4ed; border-radius: 99px; transition: .2s;
}
.toggle-sw .slider:before {
  content: ''; position: absolute;
  width: 14px; height: 14px;
  left: 3px; bottom: 3px;
  background: white; border-radius: 50%; transition: .2s;
}
.toggle-sw input:checked + .slider { background: var(--accent); }
.toggle-sw input:checked + .slider:before { transform: translateX(16px); }

/* SEO panel */
.seo-preview {
  background: white; border: 1.5px solid #e4ecf2; border-radius: 9px; padding: 13px 14px;
  margin-top: 10px;
}
.seo-preview .seo-url { font-size: 12px; color: var(--success); margin-bottom: 4px; word-break: break-all; }
.seo-preview .seo-title { font-size: 14.5px; color: #1a0dab; font-weight: 600; margin-bottom: 3px; line-height: 1.3; }
.seo-preview .seo-desc { font-size: 12.5px; color: #545454; line-height: 1.5; }

/* Progress Steps */
.form-steps {
  display: flex; align-items: center; gap: 0;
  margin-bottom: 22px; background: white;
  border: 1px solid #edf2f7; border-radius: 12px; padding: 14px 20px;
  overflow-x: auto;
  position: sticky;
  top: var(--topbar-h);
  z-index: 40;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.step-item {
  display: flex; align-items: center; gap: 8px;
  flex-shrink: 0; cursor: pointer;
}
.step-dot {
  width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid #dce4ed;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; font-family: 'Sora', sans-serif;
  color: var(--text-muted); transition: all .2s; flex-shrink: 0;
}
.step-item.active .step-dot { border-color: var(--brand); background: var(--brand); color: white; }
.step-item.done .step-dot { border-color: var(--success); background: var(--success); color: white; }
.step-label { font-size: 12.5px; font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.step-item.active .step-label, .step-item.done .step-label { color: var(--dark); }
.step-connector { flex: 1; min-width: 24px; height: 2px; background: #e4ecf2; margin: 0 8px; }
.step-connector.done { background: var(--success); }

/* Highlights list */
.highlights-list { display: flex; flex-direction: column; gap: 6px; }
.highlight-item { display: flex; align-items: center; gap: 8px; }
.highlight-item input {
  flex: 1; padding: 8px 12px; border: 1.5px solid #e4ecf2; border-radius: 8px;
  font-size: 13.5px; font-family: 'DM Sans', sans-serif; background: #f8fafc; outline: none;
}
.highlight-item input:focus { border-color: var(--brand); background: white; }
