/* ==========================================================================
   Odpočet do prázdnin (js/countdown.js): card under the weather, top-right of the home screen.
   Each holiday theme has its own background; big translucent icons decorate it.
   ========================================================================== */

.cd-card {
  position: relative;
  overflow: hidden;
  padding: 14px 16px 16px;
  border-radius: 18px;
  color: #ffffff;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
  user-select: none;
  -webkit-user-select: none;
  animation: wikiFadeIn 0.3s ease;
}

/* style.css centres text on generic elements */
.cd-card * {
  text-align: left;
  box-sizing: border-box;
}

/* ---- Themes ---- */
.cd-theme-autumn {
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 55%, #b91c1c 100%);
}

.cd-theme-christmas {
  background: linear-gradient(135deg, #14532d 0%, #15803d 50%, #b91c1c 100%);
}

.cd-theme-newyear {
  background: radial-gradient(circle at 80% 15%, rgba(250, 204, 21, 0.35), transparent 45%),
    linear-gradient(135deg, #0f172a 0%, #312e81 55%, #6d28d9 100%);
}

.cd-theme-winter {
  background: linear-gradient(135deg, #0ea5e9 0%, #3b82f6 55%, #6366f1 100%);
}

.cd-theme-spring {
  background: radial-gradient(circle at 85% 20%, rgba(244, 114, 182, 0.55), transparent 50%),
    linear-gradient(135deg, #059669 0%, #16a34a 55%, #65a30d 100%);
}

.cd-theme-easter {
  background: radial-gradient(circle at 15% 85%, rgba(250, 204, 21, 0.45), transparent 50%),
    linear-gradient(135deg, #db2777 0%, #a21caf 55%, #7c3aed 100%);
}

.cd-theme-summer {
  background: radial-gradient(circle at 88% 12%, rgba(253, 224, 71, 0.75), transparent 38%),
    linear-gradient(160deg, #0284c7 0%, #06b6d4 55%, #f59e0b 120%);
}

/* ---- Photo background (admin: "Fotky"): the photo over the gradient, darkened so white text reads ---- */
.cd-photo {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.cd-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(15, 23, 42, 0.62) 0%, rgba(15, 23, 42, 0.38) 55%, rgba(15, 23, 42, 0.22) 100%);
}

.cd-has-photo .cd-title,
.cd-has-photo .cd-unit b {
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

/* Number boxes, date pill and icon: the same dark glass on photos */
.cd-has-photo .cd-unit,
.cd-has-photo .cd-dates,
.cd-has-photo .cd-icon {
  background: rgba(15, 23, 42, 0.28);
  border-color: rgba(255, 255, 255, 0.3);
}

/* ---- Content ---- */
.cd-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cd-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.cd-titles {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.cd-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  opacity: 0.85;
}

.cd-title {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cd-dates {
  margin-left: auto;
  flex-shrink: 0;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.28);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.cd-caption {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 8px;
  font-size: 12px;
  font-weight: 700;
  opacity: 0.9;
}

.cd-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.cd-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 7px 4px 6px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.26);
}

.cd-card .cd-unit * {
  text-align: center;
}

.cd-unit b {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.cd-unit span {
  margin-top: 1px;
  font-size: 11px;
  font-weight: 700;
  opacity: 0.9;
}

/* The home card opens the window with all countdowns */
#holiday-countdown {
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

#holiday-countdown:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.24);
}

/* ---- Window with all countdowns: larger cards in a grid ---- */
.cd-window-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 22px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  grid-auto-rows: max-content;
  align-content: start;
  gap: 14px;
  background: #f8fafc;
  -webkit-overflow-scrolling: touch;
}

.cd-window-body .cd-card {
  animation: none;
}

.cd-window-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 20px;
  color: #64748b;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 17px;
  font-weight: 700;
}

.cd-window-empty * {
  text-align: center;
}

.cd-window-empty i {
  font-size: 40px;
  color: #cbd5e1;
}
