/**
 * VIOTIA Weather — card styles (VIOTIA247 design system).
 */

.viotia-weather {
  --viotia-weather-navy: var(--color-navy, var(--color-navy-900, #061638));
  --viotia-weather-accent: var(--color-electric-blue, var(--color-blue-400, #5eb3ff));
  --viotia-weather-white: #ffffff;
  --viotia-weather-border: var(--color-border, #dbe5f2);
  --viotia-weather-radius: var(--radius, var(--card-radius, 10px));
  --viotia-weather-shadow: var(--shadow, var(--shadow-card, 0 10px 30px rgba(2, 11, 34, 0.12)));

  display: block;
  padding: 1rem 1.1rem;
  color: var(--viotia-weather-white);
  background: linear-gradient(160deg, var(--color-navy-950, #020b22), var(--viotia-weather-navy));
  border: 1px solid color-mix(in srgb, var(--viotia-weather-accent) 35%, var(--viotia-weather-border));
  border-radius: var(--viotia-weather-radius);
  box-shadow: var(--viotia-weather-shadow);
}

.viotia-weather--unavailable {
  margin: 0;
  padding: 0.85rem 1rem;
  font-size: var(--font-size-sm, 0.875rem);
  color: var(--color-text-muted, #64748b);
  background: var(--color-gray-50, #f7f9fc);
  border: 1px dashed var(--viotia-weather-border);
  border-radius: var(--viotia-weather-radius);
}

.viotia-weather__header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.65rem;
}

.viotia-weather__city {
  margin: 0;
  font-size: var(--font-size-sm, 0.875rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--viotia-weather-white);
}

.viotia-weather__condition {
  margin: 0;
  font-size: var(--font-size-xs, 0.75rem);
  line-height: 1.35;
  color: var(--viotia-weather-white);
}

.viotia-weather__body {
  display: grid;
  gap: 0.5rem;
  color: var(--viotia-weather-white);
}

.viotia-weather__current {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.viotia-weather__icon {
  font-size: 1.75rem;
  line-height: 1;
}

.viotia-weather__temp {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  line-height: 1;
  color: var(--viotia-weather-white);
}

.viotia-weather__unit {
  font-size: 0.55em;
  font-weight: 600;
  color: var(--viotia-weather-white);
}

.viotia-weather__meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--font-size-xs, 0.75rem);
  color: var(--viotia-weather-white);
}

.viotia-weather__meta li {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.viotia-weather__meta span {
  color: var(--viotia-weather-white);
  opacity: 0.92;
}

.viotia-weather__meta strong {
  font-size: var(--font-size-sm, 0.875rem);
  font-weight: 600;
  color: var(--viotia-weather-white);
}

.viotia-weather__forecast {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.35rem;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid color-mix(in srgb, var(--viotia-weather-white) 22%, transparent);
  color: var(--viotia-weather-white);
}

.viotia-weather__day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  text-align: center;
  font-size: 0.68rem;
  color: var(--viotia-weather-white);
  min-width: 0;
}

.viotia-weather__day-label {
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--viotia-weather-white);
  font-size: 0.62rem;
  line-height: 1.2;
}

.viotia-weather__day-icon {
  font-size: 0.95rem;
  line-height: 1;
}

.viotia-weather__day-temp {
  font-weight: 600;
  color: var(--viotia-weather-white);
  font-size: 0.62rem;
  line-height: 1.25;
  white-space: nowrap;
}

.viotia-weather__day-condition {
  font-size: 0.58rem;
  line-height: 1.2;
  color: var(--viotia-weather-white);
}

/* Layout: compact (homepage sidebar) */
.viotia-weather--compact .viotia-weather__forecast {
  margin-top: 0.65rem;
  padding-top: 0.65rem;
}

.viotia-weather--compact .viotia-weather__temp {
  font-size: 1.85rem;
}

/* Layout: sidebar */
.viotia-weather--sidebar {
  padding: 1.1rem 1.15rem;
}

/* Layout: full */
.viotia-weather--full {
  padding: 1.25rem 1.35rem;
}

.viotia-weather--full .viotia-weather__forecast {
  gap: 0.5rem;
}

.viotia-weather--full .viotia-weather__day {
  padding: 0.4rem 0.25rem;
  background: color-mix(in srgb, var(--viotia-weather-white) 8%, transparent);
  border-radius: calc(var(--viotia-weather-radius) - 2px);
  font-size: 0.72rem;
}

.viotia-weather--full .viotia-weather__day-label,
.viotia-weather--full .viotia-weather__day-temp {
  font-size: 0.7rem;
}

@media (max-width: 480px) {
  .viotia-weather__forecast {
    gap: 0.2rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .viotia-weather__day {
    min-width: 2.35rem;
  }
}

/* Carousel (multiple Boeotia cities) */
.viotia-weather--carousel {
  position: relative;
  padding: 1rem 1.1rem 0.9rem;
  overflow: hidden;
}

.viotia-weather__slides {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.viotia-weather__slide {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 380ms ease, visibility 380ms ease;
}

.viotia-weather__slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
  pointer-events: auto;
}

.viotia-weather--carousel .viotia-weather__temp {
  font-size: 2.1rem;
  color: var(--viotia-weather-white);
}

.viotia-weather--carousel .viotia-weather__icon {
  font-size: 2rem;
}

.viotia-weather--carousel .viotia-weather__meta {
  margin-top: 0.15rem;
}

.viotia-weather--carousel .viotia-weather__forecast {
  gap: 0.25rem;
}

.viotia-weather__dots {
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  margin: 0.75rem 0 0.15rem;
  padding: 0;
}

.viotia-weather__dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--color-gray-300, #c8d2df);
  cursor: pointer;
  transition: background 200ms ease, transform 200ms ease;
}

.viotia-weather__dot.is-active {
  background: var(--color-white, var(--viotia-weather-white));
  transform: scale(1.15);
}

.viotia-weather__dot:focus-visible {
  outline: 2px solid var(--viotia-weather-white);
  outline-offset: 2px;
}
