/* =====================================================================
   TUỲ HỨNG – SMART TOOLS: THẺ ĐEN 100 TỶ, THÔNG BÁO TING TING & CAMERA OCR
   Rich Aesthetics: Cyber Gold, Holographic Obsidian, Glassmorphism
   ===================================================================== */

/* ===== 1. FLOATING NOTIFICATION BELL WIDGET ===== */
.th-notify-bell-btn {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9998;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1.15rem;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 1.5px solid #f59e0b;
  border-radius: 999px;
  color: #fbbf24;
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.35);
  transition: transform 0.25s, box-shadow 0.25s, background 0.25s;
}

.th-notify-bell-btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.55);
  background: linear-gradient(135deg, #334155, #1e293b);
}

.th-bell-icon {
  font-size: 1.2rem;
  animation: thBellRing 3s infinite ease-in-out;
  display: inline-block;
}

@keyframes thBellRing {
  0%, 85%, 100% { transform: rotate(0); }
  88%, 94% { transform: rotate(14deg); }
  91%, 97% { transform: rotate(-14deg); }
}

/* ===== 2. HERO BLACK CARD BANNER BUTTON ===== */
.th-blackcard-trigger-banner {
  margin: 1.4rem auto;
  max-width: 900px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.85));
  border: 1.5px solid rgba(245, 158, 11, 0.5);
  border-radius: 18px;
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.6), inset 0 0 20px rgba(245, 158, 11, 0.08);
  position: relative;
  overflow: hidden;
}

.th-blackcard-trigger-banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
  transform: skewX(-25deg);
  animation: thShimmer 5s infinite;
}

@keyframes thShimmer {
  0% { left: -100%; }
  25%, 100% { left: 200%; }
}

.th-bc-text-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.th-bc-badge {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0b1120;
  font-weight: 900;
  font-size: 0.75rem;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.th-bc-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
}

.th-bc-sub {
  font-size: 0.84rem;
  color: #94a3b8;
  margin-top: 0.2rem;
}

.th-bc-btn-open {
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: #fff;
  border: none;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.4);
  transition: transform 0.2s, filter 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.th-bc-btn-open:hover {
  transform: translateY(-2px);
  filter: brightness(1.12);
}

/* ===== 3. MODAL OVERLAY & POPUP STYLES ===== */
.th-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(4, 8, 18, 0.85);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.th-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.th-modal-card {
  background: #0c1527;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 24px;
  width: 100%;
  max-width: 650px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 40px rgba(245, 158, 11, 0.15);
  padding: 2rem;
  position: relative;
  color: #fff;
  transform: scale(0.95) translateY(15px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.th-modal-overlay.active .th-modal-card {
  transform: scale(1) translateY(0);
}

.th-modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #cbd5e1;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.th-modal-close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

/* ===== 4. BLACK CARD PREVIEW CANVAS ===== */
.th-blackcard-canvas-wrap {
  margin: 1.5rem 0;
  text-align: center;
  perspective: 1000px;
}

#thBlackCardCanvas {
  max-width: 100%;
  height: auto;
  border-radius: 20px;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.8), 0 0 35px rgba(245, 158, 11, 0.25);
  transition: transform 0.5s ease;
}

#thBlackCardCanvas:hover {
  transform: rotateY(6deg) rotateX(4deg) scale(1.02);
}

.th-form-group {
  margin-bottom: 1.1rem;
  text-align: left;
}

.th-form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: #cbd5e1;
  margin-bottom: 0.4rem;
}

.th-form-input, .th-form-select {
  width: 100%;
  box-sizing: border-box;
  padding: 0.75rem 1rem;
  background: rgba(2, 6, 23, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.th-form-input:focus, .th-form-select:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.25);
}

/* ITINERARY RESULT BOX */
.th-itinerary-box {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 14px;
  padding: 1.25rem;
  margin: 1.4rem 0;
  text-align: left;
}

.th-itinerary-title {
  color: #fbbf24;
  font-weight: 800;
  font-size: 1rem;
  margin: 0 0 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.th-itinerary-content {
  font-size: 0.9rem;
  color: #e2e8f0;
  line-height: 1.6;
}

/* ACTIONS BUTTONS GRID */
.th-modal-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.th-btn-primary {
  flex: 1;
  min-width: 180px;
  padding: 0.85rem 1.4rem;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  transition: filter 0.2s, transform 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.th-btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

.th-btn-secondary {
  padding: 0.85rem 1.4rem;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.th-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* ===== 5. CAMERA OCR SCANNER MODAL ===== */
.th-scanner-area {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 380px;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  margin: 1.2rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed rgba(245, 158, 11, 0.4);
}

#thCameraVideo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.th-scanner-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.th-scanner-target-box {
  width: 75%;
  height: 45%;
  border: 2px solid #10b981;
  border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5), 0 0 25px rgba(16, 185, 129, 0.6);
  position: relative;
}

.th-scanner-laser {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: #ef4444;
  box-shadow: 0 0 10px #ef4444, 0 0 20px #ef4444;
  animation: thLaserScan 2s infinite ease-in-out alternate;
}

@keyframes thLaserScan {
  0% { top: 5%; }
  100% { top: 95%; }
}

.th-scan-btn-row {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  margin-top: 1rem;
}

.btn-scan-cam {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border: none;
  font-family: inherit;
  font-weight: 800;
  padding: 0.75rem 1.2rem;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
  transition: transform 0.2s, filter 0.2s;
}

.btn-scan-cam:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

@media (max-width: 640px) {
  .th-notify-bell-btn { bottom: 16px; left: 16px; padding: 0.5rem 0.9rem; font-size: 0.78rem; }
  .th-blackcard-trigger-banner { flex-direction: column; text-align: center; }
  .th-bc-text-wrap { flex-direction: column; }
  .th-modal-card { padding: 1.4rem; }
}
