/* === Universal mini-widgets (collapsed state) === */
.shift-count-mini,
.day-info-mini,
.holidays-mini,
.news-mini {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: var(--color-on-surface-secondary);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.shift-count-mini__item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.shift-count-mini__swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}
.shift-count-mini__value {
  font-weight: 600;
  color: var(--color-on-surface);
}

.day-info-mini__sep,
.holidays-mini__sep {
  color: var(--color-on-surface-secondary);
  opacity: 0.4;
}
.day-info-mini__team {
  font-weight: 700;
}

.holidays-mini__date {
  font-weight: 700;
  color: var(--color-on-surface);
}
.holidays-mini__name {
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.holidays-mini__count {
  color: var(--color-on-surface-secondary);
  font-size: 12px;
  margin-left: 4px;
}
.holidays-mini__empty,
.news-mini__empty {
  color: var(--color-on-surface-secondary);
  font-size: 12px;
  font-style: italic;
}
.news-mini__count {
  font-weight: 700;
  color: var(--color-on-surface);
}
.news-mini__sep {
  color: var(--color-on-surface-secondary);
  opacity: 0.4;
  margin: 0 6px;
}
.news-mini__updated {
  color: var(--color-on-surface-secondary);
  font-size: 12px;
}

.calendar-block__header-action {
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--color-on-surface-secondary);
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}
.calendar-block__header-action:hover {
  background: var(--color-hover);
  color: var(--color-on-surface);
}
.calendar-block__header-action svg { display: block; }

.schedule-widget {
  flex: 1;
  min-width: 0;
}

.schedule-widget__header {
  display: flex;
  align-items: center;
  gap: 6px;
}

.schedule-widget__time {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-primary);
  white-space: nowrap;
}

.schedule-widget__title {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-on-surface);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
}

.schedule-widget__progress-track {
  height: 4px;
  background: var(--color-border);
  border-radius: 3px;
  margin-top: 6px;
  overflow: hidden;
}

.schedule-widget__progress-bar {
  height: 100%;
  background: var(--color-primary);
  border-radius: 3px;
  transition: width 0.5s ease;
}

.schedule-widget__empty {
  font-size: 12px;
  color: var(--color-on-surface-secondary);
}


/* === Weather Widget === */
.weather-widget {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.weather-current {
  display: flex;
  align-items: center;
  gap: 16px;
}

.weather-current__icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  color: var(--color-on-surface);
}

.weather-current__icon svg,
.weather-current__icon img {
  width: 100%;
  height: 100%;
  display: block;
}

.weather-current__info {
  flex: 1;
}

.weather-current__temp {
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
}

.weather-current__desc {
  font-size: 14px;
  color: var(--color-on-surface-secondary);
  margin-top: 4px;
  text-transform: capitalize;
}

.weather-current__city {
  font-size: 13px;
  color: var(--color-on-surface-secondary);
  margin-top: 2px;
}

.weather-details {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--color-on-surface-secondary);
}

.weather-details__item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.weather-details__icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.weather-details__icon svg {
  width: 100%;
  height: 100%;
}

.weather-details__label {
  font-weight: 600;
}

.weather-forecast {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  padding-bottom: 4px;
}

/* Horizontal scrollbar for weather forecast */
.weather-forecast::-webkit-scrollbar {
  height: 4px;
}
.weather-forecast::-webkit-scrollbar-track {
  background: var(--color-bg);
  border-radius: 2px;
}
.weather-forecast::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 2px;
}
.weather-forecast::-webkit-scrollbar-thumb:hover {
  background: var(--color-on-surface-secondary);
}

.weather-forecast__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 56px;
  padding: 6px 4px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  gap: 3px;
}

.weather-forecast__item--now {
  background: var(--color-primary-light);
}

.weather-forecast__hour {
  font-weight: 600;
  color: var(--color-on-surface-secondary);
  font-size: 10px;
}

.weather-forecast__icon {
  width: 22px;
  height: 22px;
  color: var(--color-on-surface);
}

.weather-forecast__icon svg,
.weather-forecast__icon img {
  width: 100%;
  height: 100%;
  display: block;
}

.weather-forecast__temp {
  font-weight: 700;
}

.weather-forecast__wind {
  display: flex;
  align-items: center;
  gap: 1px;
  font-size: 10px;
  color: var(--color-on-surface-secondary);
}

.weather-forecast__wind-arrow {
  display: inline-block;
  font-size: 10px;
  line-height: 1;
}

/* Weather mini-widget (collapsed state) */
.weather-mini {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  font-size: 13px;
  overflow: hidden;
  white-space: nowrap;
}

.weather-mini__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--color-on-surface);
}

.weather-mini__icon svg,
.weather-mini__icon img {
  width: 100%;
  height: 100%;
  display: block;
}

.weather-mini__temp {
  font-weight: 700;
  font-size: 15px;
}

.weather-mini__desc {
  color: var(--color-on-surface-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
}

.weather-mini__sep {
  color: var(--color-on-surface-secondary);
  opacity: 0.4;
}

.weather-mini__wind,
.weather-mini__detail {
  color: var(--color-on-surface-secondary);
  font-size: 12px;
}

.weather-loading, .weather-error {
  text-align: center;
  padding: 20px;
  color: var(--color-on-surface-secondary);
  font-size: 14px;
}

.weather-error__retry {
  margin-top: 8px;
  padding: 6px 16px;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  font-family: var(--font-family);
}
[data-theme="dark"] .weather-error__retry {
  color: #000;
}


/* === News Widget (horizontal scroll, mobile-style cards) === */
.news-list {
  display: flex;
  flex-direction: row;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  padding: 0 0 4px;
}
.news-item {
  position: relative;
  flex: 0 0 220px;
  height: 130px;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: var(--color-bg);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  scroll-snap-align: start;
  transition: transform 0.15s, box-shadow 0.15s;
}
.news-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.news-item__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* Градиент снизу — чтобы белый текст читался на картинке (аналог Flutter-версии) */
.news-item__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 35%,
    rgba(0, 0, 0, 0.55) 75%,
    rgba(0, 0, 0, 0.85) 100%
  );
  z-index: 1;
  pointer-events: none;
}

/* Без картинки — плейсхолдер-фон (как в мобильном приложении),
   оверлей оставляем градиентным, чтобы текст читался. */
.news-item--no-image {
  background-image: url('../../assets/news/newsBack.jpg');
  background-size: cover;
  background-position: center;
}

.news-item__content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 8px 10px 10px;
  color: #fff;
  z-index: 2;
}

.news-item__title {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.news-item__meta {
  font-size: 10px;
  margin-top: 4px;
  opacity: 0.9;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.news-loading {
  text-align: center;
  padding: 20px;
  color: var(--color-on-surface-secondary);
  font-size: 14px;
}

