/* ==========================================================================
   xem-ngay-tot/styles.css - Giao diện Phong Thủy Thức Tâm
   Đồng bộ với nhận diện thương hiệu phongthuythuctam.com
   ========================================================================== */

:root {
  --paper: #faf6ee;
  --card: #fffdf8;
  --card-elevated: #ffffff;
  --ink: #2b2118;
  --muted: #6b5d4f;
  --line: #e7dcc8;
  --red: #7f1d1d;
  --red-2: #9e2a2b;
  --red-light: #dc2626;
  --gold: #b8892d;
  --gold-dark: #926718;
  --gold-soft: #f6ead0;
  --gold-subtle: rgba(184, 137, 45, 0.12);

  --jade: #1b8a5a;
  --jade-light: #10b981;
  --jade-subtle: rgba(27, 138, 90, 0.12);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow: 0 1px 3px rgba(60, 40, 20, 0.06), 0 6px 20px rgba(60, 40, 20, 0.08);
  --shadow-lg: 0 10px 25px rgba(60, 40, 20, 0.12);
}

/* Page Intro & Breadcrumb */
.tool-page {
  padding-top: 16px;
  padding-bottom: 50px;
}

.crumbs {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
}

.crumbs a {
  color: var(--muted);
  text-decoration: none;
}

.crumbs a:hover {
  color: var(--red-2);
  text-decoration: underline;
}

.tool-header {
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}

.tool-header h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--red);
  margin: 0 0 8px;
}

.tool-lead {
  font-size: 15px;
  color: var(--muted);
  margin: 0;
  max-width: 860px;
  line-height: 1.6;
}

/* Main Grid Layout */
.tool-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 960px) {
  .tool-grid {
    grid-template-columns: 1fr;
  }
}

/* Box Common */
.tool-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
}

.box-title {
  font-family: "Noto Serif", Georgia, serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--red-2);
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Form Controls */
.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 5px;
}

.form-label .req {
  color: var(--red-2);
}

.form-input, .form-select {
  width: 100%;
  padding: 9px 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: 14px;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-subtle);
}

.cal-type-toggle {
  display: flex;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 3px;
}

.cal-type-toggle label {
  flex: 1;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.2s;
}

.cal-type-toggle input[type="radio"] {
  display: none;
}

.cal-type-toggle label.active {
  background: var(--red);
  color: #ffffff;
}

.checkbox-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  margin-top: 6px;
}

.checkbox-line input {
  accent-color: var(--red);
  width: 15px;
  height: 15px;
}

.birth-hour-wrap.disabled {
  opacity: 0.45;
  pointer-events: none;
}

.task-preview {
  margin-top: 6px;
  padding: 8px 12px;
  background: var(--gold-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--ink);
  line-height: 1.45;
}

.btn-submit-main {
  width: 100%;
  padding: 12px 16px;
  background: var(--red);
  color: #ffffff;
  font-family: "Noto Serif", serif;
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(127, 29, 29, 0.25);
  transition: background 0.2s, transform 0.15s;
  margin-top: 14px;
}

.btn-submit-main:hover {
  background: var(--red-2);
  transform: translateY(-1px);
}

/* Profile Badge Box */
.profile-box {
  margin-top: 18px;
  background: var(--paper);
  border: 1px solid var(--gold);
  border-radius: var(--radius-md);
  padding: 14px;
}

.profile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--line);
}

.profile-name {
  font-weight: 700;
  color: var(--red-2);
  font-size: 14px;
}

.profile-badge {
  font-size: 11px;
  font-weight: 700;
  background: var(--gold-soft);
  color: var(--gold-dark);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--line);
}

.profile-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: 12px;
}

.prof-cell {
  background: #ffffff;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.prof-cell .lbl {
  color: var(--muted);
  display: block;
  font-size: 10px;
  text-transform: uppercase;
}

.prof-cell .val {
  font-weight: 600;
  color: var(--ink);
  margin-top: 2px;
}

.prof-cell.full {
  grid-column: 1 / -1;
}

/* Tabs */
.tool-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--line);
  padding-bottom: 4px;
  overflow-x: auto;
}

.tab-btn {
  padding: 9px 16px;
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--ink);
  background: var(--gold-soft);
}

.tab-btn.active {
  color: var(--red);
  background: #ffffff;
  border: 1px solid var(--line);
  border-bottom: 2px solid #ffffff;
  margin-bottom: -6px;
  font-weight: 700;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Top Days Filter Bar */
.filter-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
  background: var(--card);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
}

/* Day Cards */
.days-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.day-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: 0 1px 4px rgba(60, 40, 20, 0.05);
  cursor: pointer;
  transition: all 0.2s;
}

.day-card:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.day-card.selected {
  border-color: var(--red);
  box-shadow: 0 0 0 2px var(--red);
  background: var(--card);
}

.day-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.day-title-wrap {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}

.solar-date-txt {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.lunar-date-txt {
  font-size: 12px;
  font-weight: 600;
  background: var(--gold-soft);
  color: var(--gold-dark);
  padding: 2px 7px;
  border-radius: 4px;
}

.canchi-txt {
  font-size: 12px;
  color: var(--muted);
}

.score-badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.score-badge.dai_cat { background: var(--jade); }
.score-badge.cat { background: #059669; }
.score-badge.binh_hoa { background: var(--gold); }
.score-badge.tieu_hung { background: #ea580c; }
.score-badge.dai_hung { background: var(--red-light); }

.tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 10px;
}

.tag-pill {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 600;
}

.tag-hd { background: var(--gold-soft); color: var(--gold-dark); border: 1px solid var(--line); }
.tag-hac { background: #f1f5f9; color: #64748b; }
.tag-hop { background: var(--jade-subtle); color: var(--jade); border: 1px solid rgba(27, 138, 90, 0.2); }
.tag-xung { background: #fee2e2; color: #dc2626; border: 1px solid #fca5a5; }
.tag-warn { background: #fee2e2; color: #b91c1c; }
.tag-dung-than {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  border: 1px solid #f59e0b;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(245, 158, 11, 0.15);
}
.tag-hy-than {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #34d399;
  font-weight: 600;
}
.tag-ky-than {
  background: #fff1f2;
  color: #9f1239;
  border: 1px solid #fda4af;
  font-weight: 600;
}

.day-desc-txt {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 10px;
}

.golden-hours-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  font-size: 11px;
}

.golden-pill {
  background: var(--gold-soft);
  color: var(--gold-dark);
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid rgba(184, 137, 45, 0.2);
}

/* Calendar Month View */
.cal-wrap {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow);
}

.cal-nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.cal-title-txt {
  font-family: "Noto Serif", serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--red);
}

.cal-btn {
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
}

.cal-btn:hover {
  background: var(--gold-soft);
}

.cal-legend-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 11px;
  color: var(--muted);
  padding: 6px 10px;
  background: var(--paper);
  border-radius: var(--radius-sm);
}

.leg-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
}

.cal-grid-table {
  width: 100%;
  border-collapse: collapse;
}

.cal-grid-table th {
  padding: 8px 4px;
  font-size: 12px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.cal-grid-table td {
  width: 14.28%;
  padding: 4px 2px;
  vertical-align: top;
}

.cal-cell {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 6px 4px;
  min-height: 64px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.15s;
}

.cal-cell:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow);
  transform: scale(1.02);
}

.cal-cell.is-selected {
  border-color: var(--red);
  box-shadow: 0 0 0 2px var(--red);
  background: var(--paper);
}

.cal-cell.other-month {
  opacity: 0.35;
  pointer-events: none;
}

.c-solar {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.c-lunar {
  font-size: 10px;
  color: var(--gold-dark);
  font-weight: 600;
}

.c-bar {
  height: 3px;
  border-radius: 2px;
  margin: 3px 0;
}

/* Detail View */
.detail-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
}

.detail-banner {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 20px;
}

.detail-date-h {
  font-family: "Noto Serif", serif;
  font-size: 20px;
  color: var(--red);
  margin: 0 0 4px;
}

.score-circle {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.score-circle .pts { font-size: 24px; font-weight: 900; line-height: 1; }
.score-circle .sub { font-size: 9px; font-weight: 700; text-transform: uppercase; margin-top: 2px; }

.advice-quote {
  background: var(--gold-soft);
  border-left: 4px solid var(--gold);
  padding: 12px 16px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--ink);
}

.stat-tiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
  margin-bottom: 24px;
}

.stat-tile {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.stat-tile .hd { font-size: 11px; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.stat-tile .val { font-size: 14px; font-weight: 700; color: var(--ink); margin: 3px 0; }
.stat-tile .sub { font-size: 11px; color: var(--muted); }

/* Hours Grid */
.hours-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.h-tile {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  position: relative;
  overflow: hidden;
}

.h-tile::before {
  content: "";
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 4px;
  background: var(--line);
}

.h-tile.h-dai_cat::before { background: var(--jade); }
.h-tile.h-hoang_dao::before { background: var(--gold); }
.h-tile.h-hop_tuoi::before { background: #059669; }
.h-tile.h-xung_tuoi::before { background: var(--red-light); }

.h-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}

.h-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.h-badge.dai_cat { background: var(--jade-subtle); color: var(--jade); }
.h-badge.hoang_dao { background: var(--gold-soft); color: var(--gold-dark); }
.h-badge.hop_tuoi { background: var(--jade-subtle); color: #059669; }
.h-badge.xung_tuoi { background: #fee2e2; color: #dc2626; }
.h-badge.binh_thuong { background: #f1f5f9; color: var(--muted); }

.h-meta {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
}

.h-note {
  font-size: 11px;
  color: var(--ink);
  line-height: 1.4;
}

/* ==========================================================================
   PHẦN QUẢNG CÁO & HỘP TƯ VẤN CHUYÊN SÂU (CONSULTATION CALL-TO-ACTION)
   Theo đúng yêu cầu của người dùng: "viết thêm cho tôi phần quảng cáo 
   nếu cần tư vấn thêm liên hệ tôi mỗi khi khách xem"
   ========================================================================== */

.booking-consult-box {
  margin: 28px 0;
  background: linear-gradient(135deg, #fffdf8 0%, #faf3e3 100%);
  border: 2px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 4px 16px rgba(184, 137, 45, 0.15);
  position: relative;
  overflow: hidden;
}

.booking-consult-box::after {
  content: "";
  position: absolute;
  right: -10px;
  bottom: -15px;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(184, 137, 45, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.consult-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.consult-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
  object-fit: cover;
  background: #ffffff;
}

.consult-title-area h3 {
  font-family: "Noto Serif", Georgia, serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--red);
  margin: 0 0 6px;
  line-height: 1.35;
}

.consult-title-area p {
  font-size: 14px;
  color: var(--ink);
  line-height: 1.55;
  margin: 0;
}

.consult-target-highlight {
  display: inline-block;
  background: var(--gold-soft);
  color: var(--gold-dark);
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--line);
}

.consult-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.btn-consult {
  flex: 1;
  min-width: 220px;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.2s;
  box-sizing: border-box;
}

.btn-consult-zalo {
  background: #0068ff;
  color: #ffffff !important;
}

.btn-consult-zalo:hover {
  background: #0056d6;
  transform: translateY(-1px);
}

.btn-consult-fb {
  background: #0084ff;
  color: #ffffff !important;
}

.btn-consult-fb:hover {
  background: #006ee0;
  transform: translateY(-1px);
}

.btn-consult-call {
  background: var(--red);
  color: #ffffff !important;
}

.btn-consult-call:hover {
  background: var(--red-2);
  transform: translateY(-1px);
}

.consult-footer-note {
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.4;
}

/* Inline Card Consultation Banner inside Top Days */
.inline-consult-card {
  background: linear-gradient(135deg, var(--gold-soft) 0%, #fff8ea 100%);
  border: 1px dashed var(--gold);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.inline-consult-text h4 {
  font-family: "Noto Serif", serif;
  font-size: 15px;
  color: var(--red);
  margin: 0 0 4px;
}

.inline-consult-text p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}

.inline-consult-btn {
  padding: 8px 16px;
  background: var(--red);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(127, 29, 29, 0.2);
}

.inline-consult-btn:hover {
  background: var(--red-2);
}
