/*
 * btv-widget.css
 * Best-time-to-visit widget styles for okavango.com
 * Extracted from style-enhancements.css (moremi.com package pages)
 * Includes design tokens and BTV-specific animations
 */

/* --- Design tokens --- */

:root {
  --accent:      #c17d3c;
  --accent-dark: #8a5520;
  --ink:         #2a2118;
  --ink-mid:     #6b5f55;
  --surface:     #faf8f5;
  --white:       #ffffff;
  --border:      #e8e0d6;
  --ease:        cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-sm:   0 2px 8px  rgba(42,33,24,0.08);
  --shadow-md:   0 6px 20px rgba(42,33,24,0.11);
}

/* --- BTV widget section --- */

.section-best-time {
  clear: both;
  width: 100%;
  margin: 0;
  padding: 24px 0 32px;
  box-sizing: border-box;
}

.section-best-time h2 {
  margin: 0 0 6px;
}

.section-best-time .btv-intro {
  display: block;
  width: 100%;
  font-family: 'museo-sans', sans-serif;
  font-size: 1em;
  color: #646464;
  margin: 0 0 24px;
  line-height: 1.7;
}

/* --- Month bar grid --- */

.btv-months {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 4px;
  margin-bottom: 24px;
  min-width: 0;
}

.btv-month {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.btv-month-label {
  font-size: 0.68em;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-mid);
}

.btv-month-bar {
  width: 100%;
  height: 36px;
  border-radius: 5px;
  position: relative;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
  cursor: default;
  transform-origin: bottom center;
  transform: scaleY(0);
  opacity: 0;
}

.btv-month-bar:hover {
  transform: scaleY(1.08);
  box-shadow: var(--shadow-sm);
}

.btv-month-bar.btv-animated {
  transform: scaleY(1);
  opacity: 1;
  transition:
    transform 0.5s var(--ease),
    opacity   0.3s var(--ease),
    box-shadow 0.18s var(--ease);
}

.btv-month-bar.btv-animated:hover {
  transform: scaleY(1.08);
  box-shadow: var(--shadow-sm);
}

/* Rating colours */
.btv-peak     { background: linear-gradient(to bottom, #d08f50, #b06e2a); }
.btv-good     { background: linear-gradient(to bottom, #e8b070, #cc9050); }
.btv-shoulder { background: linear-gradient(to bottom, #f0d4a8, #ddb880); }
.btv-low      { background: linear-gradient(to bottom, #f5e4c8, #e0c898); }

/* --- Season card entrance animation --- */

.btv-season-card {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity   0.5s var(--ease),
    transform 0.5s var(--ease),
    box-shadow 0.2s var(--ease);
}

.btv-season-card.btv-card-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Tooltip on hover --- */

.btv-month-bar::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--white);
  font-size: 0.72em;
  white-space: nowrap;
  padding: 4px 9px;
  border-radius: 4px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 10;
}

.btv-month-bar:hover::after { opacity: 1; }

/* --- Legend --- */

.btv-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 28px;
}

.btv-legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8em;
  color: var(--ink-mid);
  font-weight: 600;
}

.btv-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* --- Season cards grid --- */

.btv-seasons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.btv-season-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 22px 22px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}

.btv-season-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.btv-season-card .btv-season-indicator {
  width: 28px;
  height: 5px;
  border-radius: 3px;
  margin-bottom: 13px;
}

.btv-season-card h3 {
  font-size: 1.05em;
  font-weight: 700;
  margin: 0 0 3px;
}

.btv-season-card .btv-season-dates {
  font-size: 0.78em;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-mid);
  margin: 0 0 12px;
}

.btv-season-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.875em;
  line-height: 1.65;
  color: var(--ink-mid);
}

.btv-season-card ul li {
  padding-left: 16px;
  position: relative;
  margin-bottom: 4px;
}

.btv-season-card ul li::before {
  content: "\2013";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* --- Callout panel --- */

.btv-callout {
  background: #fff7ee;
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: 13px 16px;
  margin-top: 20px;
  font-size: 0.875em;
  color: var(--ink-mid);
  line-height: 1.65;
}

.btv-callout strong {
  color: var(--ink);
}

/* --- Responsive --- */

@media (max-width: 700px) {
  .btv-month-label { font-size: 0.6em; }
  .btv-month-bar   { height: 28px; }
  .btv-seasons     { grid-template-columns: 1fr 1fr; }
  .btv-month-bar::after { display: none; }
}

@media (max-width: 480px) {
  .btv-seasons { grid-template-columns: 1fr; }
  .btv-months  { gap: 3px; }
}
