/* ==================== Floating Weather & Calendar Widgets ==================== */

.floating-widget {
  position: fixed; z-index: 999;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,.1);
  transition: all .45s cubic-bezier(.4,0,.2,1);
  right: 16px;
  overflow: hidden;
  backdrop-filter: blur(12px);
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(226,232,240,.8);
}

.floating-widget .widget-body {
  width: 230px;
  padding: .9rem 1rem .8rem;
  transition: opacity .3s;
}

.floating-widget .widget-title {
  font-size: .7rem; font-weight: 600; color: #94A3B8;
  margin-bottom: 8px; display: flex; align-items: center; gap: 5px;
  letter-spacing: .8px; text-transform: uppercase;
}
.floating-widget .widget-title i { color: var(--primary); font-size: .75rem; }

/* ─── Collapsed tab ─── */
.floating-widget .widget-tab {
  position: absolute; right: 0; top: 0; bottom: 0; width: 24px;
  cursor: pointer; z-index: 3;
  background: var(--card);
  border-radius: 14px 0 0 14px;
  border: 1px solid var(--border);
  border-right: none;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 2px;
  color: #94A3B8; font-size: .7rem;
  transition: all .25s;
}
.floating-widget .widget-tab:hover {
  color: var(--primary); background: #F8FAFC;
}

/* States */
.floating-widget.visible {
  transform: translateX(0);
  box-shadow: 0 8px 32px rgba(0,0,0,.1);
}
.floating-widget.visible .widget-body { opacity: 1; }
.floating-widget.visible .widget-tab {
  background: transparent; border: none; width: 18px;
  color: #CBD5E1; font-size: .65rem;
}
.floating-widget.visible .widget-tab:hover { color: var(--primary); }
.floating-widget.visible .widget-tab i { pointer-events: none; }

.floating-widget.minimized {
  transform: translateX(calc(100% - 5px));
  box-shadow: none;
  border-color: transparent;
  background: transparent;
  backdrop-filter: none;
}
.floating-widget.minimized .widget-body { opacity: 0; pointer-events: none; }
.floating-widget.minimized .widget-tab {
  width: 30px; height: 70px; top: 50%; transform: translateY(-50%);
  border-radius: 8px 4px 4px 8px;
  border: 1px solid rgba(226,232,240,.6);
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(8px);
  box-shadow: -2px 0 8px rgba(0,0,0,.04);
  color: #94A3B8; font-size: .75rem;
  bottom: auto;
}
.floating-widget.minimized .widget-tab:hover {
  color: var(--primary); background: rgba(255,255,255,.95);
  box-shadow: -3px 0 12px rgba(79,70,229,.1);
}

#floatingWeather { top: 82px; }
#floatingCalendar { top: 410px; }

/* ==================== Weather ==================== */
.floating-weather .weather-now {
  display: flex; align-items: center; gap: 10px; margin-bottom: 6px;
}
.floating-weather .weather-icon { font-size: 1.6rem; width: 36px; text-align: center; }
.floating-weather .weather-info { flex: 1; }
.floating-weather .weather-temp {
  font-size: 1.6rem; font-weight: 700; line-height: 1; color: #0F172A;
}
.floating-weather .weather-temp sup { font-size: .7rem; font-weight: 400; color: #94A3B8; }
.floating-weather .weather-desc {
  font-size: .75rem; color: #64748B; margin-top: 1px;
}
.floating-weather .weather-city {
  font-size: .65rem; color: #94A3B8; display: flex; align-items: center; gap: 3px; margin-top: 1px;
}
.floating-weather .weather-city i { font-size: .55rem; }

.floating-weather .weather-meta {
  display: flex; gap: 10px; font-size: .7rem; color: #94A3B8;
  padding: 5px 0; margin-top: 3px;
}
.floating-weather .weather-meta span { display: flex; align-items: center; gap: 3px; }

.floating-weather .weather-forecast {
  display: flex; gap: 2px; margin-top: 6px; padding-top: 6px;
  border-top: 1px solid #F1F5F9;
}
.floating-weather .weather-day {
  flex: 1; text-align: center; padding: 3px 0; border-radius: 6px;
  transition: background .2s;
}
.floating-weather .weather-day:hover { background: #F8FAFC; }
.floating-weather .weather-day-name { font-size: .6rem; color: #94A3B8; font-weight: 600; }
.floating-weather .weather-day-icon { font-size: .85rem; display: block; padding: 2px 0; }
.floating-weather .weather-day-temp { font-size: .65rem; font-weight: 600; color: #475569; }

.weather-loading { text-align: center; padding: .6rem; font-size: .72rem; color: #94A3B8; }
.weather-loading i { margin-right: 4px; }

/* ==================== Calendar ==================== */
.floating-calendar .calendar-header {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px;
}
.floating-calendar .calendar-header h3 { font-size: .72rem; font-weight: 600; color: #475569; }

.floating-calendar .calendar-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px;
}
.floating-calendar .calendar-weekday {
  text-align: center; font-weight: 600; font-size: .58rem;
  color: #94A3B8; padding: 2px 0;
}
.floating-calendar .calendar-day {
  text-align: center; padding: 3px 0; border-radius: 4px;
  font-size: .68rem; cursor: default; font-weight: 500; color: #475569;
  transition: background .15s;
}
.floating-calendar .calendar-day:hover { background: #F8FAFC; }
.floating-calendar .calendar-day.today {
  background: var(--primary); color: #fff; font-weight: 700;
}
.floating-calendar .calendar-day.other-month { color: #CBD5E1; }
.floating-calendar .calendar-day.weekend { color: #EF4444; }
.floating-calendar .calendar-day.today.weekend { color: #fff; }
.floating-calendar .calendar-day.today:hover { background: var(--primary-dark); }

@media (max-width: 1500px) {
  .floating-widget { display: none !important; }
}
