/* frontend/static/css/reports/daily_time_slot_report.css */

.dtsr-wrapper {
  padding: 10px 12px 16px;
  max-width: 960px;
  margin: 0 auto;
  animation: dtsr-subtle-glow 0.8s ease-out;
}

.dtsr-page {
  background: #fbf7ff;
  border-radius: 16px;
  padding: 12px 12px 16px;
  box-shadow: 0 4px 18px rgba(44, 26, 78, 0.12);
}

/* Header */

.dtsr-header {
  border-bottom: 1px solid rgba(123, 44, 191, 0.1);
  padding-bottom: 8px;
  margin-bottom: 10px;
}

.dtsr-header-top {
  display: flex;
  justify-content: center;
}

.dtsr-title {
  /* Pixel-perfect match to .dar-title from Daily AI/Jothida report */
  font-size: 1.25rem;
  margin: 6px 0;
  color: #7b2cbf;
  letter-spacing: 0.02em;
  text-align: center;
  font-weight: 900;
  position: relative;
}

.dtsr-title::after {
  content: '';
  display: block;
  height: 3px;
  width: 46px; /* same width as dar-title underline */
  background: linear-gradient(90deg,#ffd54a,#ffd54a 60%, rgba(123,44,191,0));
  border-radius: 2px;
  margin: 6px auto 0;
  opacity: .95;
}

.dtsr-header-meta {
  margin-top: 4px;
  display: flex;
  justify-content: center; /* center chips under title like Jothida */
}

.dtsr-meta-inner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dtsr-date-chip,
.dtsr-location-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  font-size: 0.82rem;
  background: rgba(123,44,191,0.08);
  color: #4b2166;
  border: 1px solid rgba(123,44,191,0.08);
  font-weight: 700;
}

/* subtle heartbeat/pulse animation to match Jothida chips */
.dtsr-date-chip, .dtsr-location-chip { transform-origin: center; animation: dtsr-heartbeat 4s ease-in-out infinite; }
@keyframes dtsr-heartbeat{ 0%{ transform:scale(1) } 10%{ transform:scale(1.06) } 20%{ transform:scale(1) } 100%{ transform:scale(1) } }

/* ensure chips wrap nicely on narrow viewports */
.dtsr-meta-inner { gap: 10px; flex-wrap: wrap; justify-content: center; }

/* Highlight section */

.dtsr-highlight {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: #f3f0ff;
  border: 1px dashed rgba(123, 44, 191, 0.25);
}

.dtsr-highlight-title {
  margin: 0 0 6px;
  font-size: 0.9rem;
  color: #4b2166;
}

.dtsr-highlight-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dtsr-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  background: #ffffff;
  border: 1px solid #e0c7ff;
  color: #4b2166;
}

.dtsr-chip-time {
  font-weight: 500;
  color: #16a34a;
}

/* Slot section */

.dtsr-slot-section {
  margin-top: 10px;
}

.dtsr-slot-section-title {
  margin: 0 0 6px;
  font-size: 0.95rem;
  color: #3b215f;
}

.dtsr-slot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

@media (min-width: 720px) {
  .dtsr-slot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Slot card base */

.dtsr-slot-card {
  background: #fdf7ff;
  border-radius: 12px;
  padding: 9px 10px;
  box-shadow: 0 1px 3px rgba(43, 16, 82, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.35);
  position: relative;
  overflow: hidden;
}

/* subtle left colour strip instead of full red/green border */

.dtsr-slot-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  border-left: 3px solid transparent;
}

.dtsr-slot-card.is-very-good::before {
  border-left-color: #16a34a;
}

.dtsr-slot-card.is-good::before {
  border-left-color: #22c55e;
}

.dtsr-slot-card.is-neutral::before {
  border-left-color: #9ca3af;
}

.dtsr-slot-card.is-bad::before {
  border-left-color: #f97316;
}

.dtsr-slot-card.is-very-bad::before {
  border-left-color: #ef4444;
}

/* Slot header */

.dtsr-slot-header {
  margin-bottom: 4px;
}

.dtsr-slot-title-block {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-start;
  margin-bottom: 2px;
}

.dtsr-slot-label {
  font-weight: 700;
  font-size: 0.9rem;
  color: #3b215f;
}

.dtsr-slot-rating-emoji {
  font-size: 0.9rem;
}

.dtsr-now-chip {
  margin-left: auto;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  background: linear-gradient(90deg, #7b2cbf, #a855f7);
  color: #fff;
  line-height: 1.2;
  animation: pulseBadge 2.5s infinite;
  padding: 2px 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}


/* === Today badge pulse animation === */
.today-badge {
  background: #7b2cbf;       /* site purple */
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  line-height: 1.2;
  animation: pulseBadge 2.5s infinite;
}

/* time + status row */

.dtsr-slot-time-row {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  align-items: baseline;
}

.dtsr-slot-time {
  font-size: 0.8rem;
  color: #6b21a8;
  font-weight: 500;
}

.dtsr-slot-status {
  font-size: 0.78rem;
  font-weight: 600;
}

/* tint by rating on status text only */

.dtsr-slot-status.is-very-good {
  color: #16a34a;
}
.dtsr-slot-status.is-good {
  color: #22c55e;
}
.dtsr-slot-status.is-neutral {
  color: #4b5563;
}
.dtsr-slot-status.is-bad {
  color: #ea580c;
}
.dtsr-slot-status.is-very-bad {
  color: #b91c1c;
}

/* Text blocks */

.dtsr-slot-brief {
  margin: 4px 0 2px;
  font-size: 0.83rem;
  color: #4b5563;
}

.dtsr-slot-summary {
  margin: 0 0 4px;
  font-size: 0.8rem;
  color: #4b5563;
}

/* Detail list – clean stacked value-pairs */

.dtsr-slot-details {
  margin: 0;
  padding: 0;
  font-size: 0.78rem;
}

.dtsr-detail-row {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px dashed rgba(148, 163, 184, 0.5);
}

.dtsr-detail-row:first-of-type {
  margin-top: 2px;
}

.dtsr-detail-row dt {
  font-weight: 600;
  color: #6b4a9b;
  margin: 0 0 1px;
}

.dtsr-detail-row dd {
  margin: 0;
  color: #374151;
}

/* Current slot – soft lift */

.dtsr-slot-card.is-current {
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.3),
              0 4px 16px rgba(34, 197, 94, 0.18);
}

/* Empty state */

.dtsr-empty {
  padding: 0.8rem 0.9rem;
  border-radius: 12px;
  border: 1px dashed #d4bfff;
  background: rgba(248, 250, 252, 0.7);
  font-size: 0.9rem;
  color: #4b5563;
  text-align: center;
}

/* Bottom CTAs – reuse style from graha page */

.dtsr-bottom-ctas {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
  align-items: stretch;
}

.dtsr-bottom-ctas .btn-back {
  flex: 1 1 0;
  min-width: 0;
  max-width: 340px;
  text-align: center;
}

/* Buttons + disclaimer */

.btn-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  border: 1px solid #e0c7ff;
  background: #faf5ff;
  color: #4b2166;
  font-size: 0.85rem;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.15s ease, box-shadow 0.15s ease,
    transform 0.1s ease;
}

.btn-back:hover {
  background: #f3e8ff;
  box-shadow: 0 2px 8px rgba(123, 44, 191, 0.16);
  transform: translateY(-1px);
}

.dtsr-disclaimer {
  margin-top: 8px;
  font-size: 0.8rem;
  color: #4b5563;
}

/* Utilities */

.preline {
  white-space: pre-line;
}

/* Animations */

@keyframes dtsr-subtle-glow {
  0% {
    box-shadow: 0 2px 10px rgba(123, 44, 191, 0.03);
  }
  50% {
    box-shadow: 0 6px 22px rgba(123, 44, 191, 0.08);
  }
  100% {
    box-shadow: 0 2px 10px rgba(123, 44, 191, 0.03);
  }
}

.dtsr-glow {
  animation: dtsr-heartbeat 1s ease-out;
}

@keyframes dtsr-heartbeat {
  0% {
    transform: scale(1);
  }
  10% {
    transform: scale(1.04);
  }
  20% {
    transform: scale(1);
  }
  100% {
    transform: scale(1);
  }
}

@media (max-width: 520px) {
  .dtsr-bottom-ctas {
    flex-direction: column;
    gap: 0.6rem;
  }
  .dtsr-bottom-ctas .btn-back {
    width: 100%;
    max-width: 100%;
  }
}

/* Breadcrumb */

.breadcrumb-nav.micro {
  margin: 8px 0 6px;
  font-size: 0.75rem;
  color: var(--muted, #6f6a80);
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
}
.breadcrumb-nav.micro a {
  color: var(--brand-700, #6b21a8);
  text-decoration: none;
}
.breadcrumb-nav.micro .sep {
  opacity: 0.6;
}

.breadcrumb-nav {
  font-size: 0.8rem;
  color: #6c757d;
  margin-bottom: 1rem;
}
.breadcrumb-nav a {
  text-decoration: none;
  color: #7b2cbf;
  font-weight: 600;
}
.breadcrumb-nav,
.breadcrumb-nav.micro {
  margin-top: 4px !important;
  margin-bottom: 6px !important;
}

