/**
 * Vlastní styly pro kalendář obsazenosti e-chalupy.cz
 * Laděno na design webu (Slovácká modrá paleta, DM Sans + Outfit font)
 * 
 * Barevná paleta:
 * - Primary (modrá): #1e5fa8, #2d7cc1, #1a4f8a
 * - Secondary (písková): #f8cf8e, #fdf3db, #e0a84d
 * - Text: #54565f
 * 
 * Skutečné CSS třídy z e-chalupy.cz:
 * - .month - kontejner měsíce
 * - .month-name - název měsíce  
 * - .days - řádek se dny v týdnu
 * - .day-free - volný den
 * - .day-full - obsazený den
 * - .day-half - částečně obsazený
 * - .day-shdw - neaktivní dny (mimo měsíc)
 */

/* ============================================
   IMPORT FONTŮ
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Outfit:wght@600&display=swap');

/* ============================================
   ZÁKLADNÍ RESET
   ============================================ */
html, body {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif !important;
  background-color: transparent !important;
  padding: 8px !important;
  margin: 0 !important;
  overflow: hidden !important;
}

#obal {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  gap: 16px !important;
}

/* ============================================
   KONTEJNER MĚSÍCE (.month)
   ============================================ */
.month {
  background: white !important;
  border-radius: 16px !important;
  box-shadow: 
    0 4px 6px -1px rgba(30, 95, 168, 0.08),
    0 2px 4px -2px rgba(30, 95, 168, 0.06),
    0 0 0 1px rgba(26, 79, 138, 0.05) !important;
  border: none !important;
  overflow: hidden !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  margin: 4px !important;
  float: none !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.month:hover {
  transform: translateY(-2px) !important;
  box-shadow: 
    0 8px 12px -2px rgba(30, 95, 168, 0.12),
    0 4px 6px -2px rgba(30, 95, 168, 0.08),
    0 0 0 1px rgba(26, 79, 138, 0.08) !important;
}

/* ============================================
   HLAVIČKA MĚSÍCE (.month-name)
   ============================================ */
.month-name {
  background: linear-gradient(135deg, #2d7cc1 0%, #1e5fa8 100%) !important;
  color: white !important;
  font-family: 'Outfit', system-ui, sans-serif !important;
  font-weight: 700 !important;
  font-size: 15px !important;
  padding: 14px 16px !important;
  text-transform: capitalize !important;
  letter-spacing: 0.02em !important;
  border: none !important;
  position: relative !important;
}

/* Decorative accent line (písková/zlatá) */
.month-name::after {
  content: '' !important;
  position: absolute !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 3px !important;
  background: linear-gradient(90deg, #f8cf8e 0%, #e0a84d 50%, #f5c170 100%) !important;
}

/* ============================================
   DNY V TÝDNU (.days)
   ============================================ */
.days td {
  background: linear-gradient(180deg, #e8f1fa 0%, #d1e3f5 100%) !important;
  color: #1a4f8a !important;
  font-weight: 600 !important;
  font-size: 11px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  padding: 10px 4px !important;
  height: auto !important;
}

/* ============================================
   ZÁKLADNÍ STYL BUNĚK
   ============================================ */
.month td {
  text-align: center !important;
  vertical-align: middle !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  width: 34px !important;
  height: 34px !important;
  border: none !important;
  transition: transform 0.15s ease !important;
}

.month tr {
  height: auto !important;
}

/* ============================================
   VOLNÉ TERMÍNY (.day-free) - Forest Green
   ============================================ */
.day-free {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important;
  color: white !important;
  border-radius: 8px !important;
  box-shadow: 0 2px 4px rgba(22, 163, 74, 0.25) !important;
}

/* ============================================
   OBSAZENÉ TERMÍNY (.day-full) - Warm Red
   ============================================ */
.day-full {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
  color: white !important;
  border-radius: 8px !important;
  box-shadow: 0 2px 4px rgba(220, 38, 38, 0.25) !important;
}

/* Přechody pro příjezd/odjezd */
.day-full.z {
  background: linear-gradient(135deg, #22c55e 0%, #22c55e 49%, #ef4444 50%, #ef4444 100%) !important;
}

.day-full.k {
  background: linear-gradient(135deg, #ef4444 0%, #ef4444 49%, #22c55e 50%, #22c55e 100%) !important;
}

/* ============================================
   ČÁSTEČNĚ OBSAZENÉ (.day-half) - Warm Amber
   ============================================ */
.day-half {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  color: white !important;
  border-radius: 8px !important;
  box-shadow: 0 2px 4px rgba(217, 119, 6, 0.25) !important;
}

/* Přechody pro částečně obsazené */
.day-half.z {
  background: linear-gradient(135deg, #22c55e 0%, #22c55e 49%, #f59e0b 50%, #f59e0b 100%) !important;
}

.day-half.k {
  background: linear-gradient(135deg, #f59e0b 0%, #f59e0b 49%, #22c55e 50%, #22c55e 100%) !important;
}

.day-half.zo {
  background: linear-gradient(135deg, #ef4444 0%, #ef4444 49%, #f59e0b 50%, #f59e0b 100%) !important;
}

.day-half.ko {
  background: linear-gradient(135deg, #f59e0b 0%, #f59e0b 49%, #ef4444 50%, #ef4444 100%) !important;
}

/* ============================================
   NEAKTIVNÍ DNY (.day-shdw)
   ============================================ */
.day-shdw {
  background: #e8f1fa !important;
  color: #a3c7eb !important;
  border-radius: 8px !important;
}

.day-shdw:hover {
  transform: none !important;
  box-shadow: none !important;
}

/* ============================================
   LEGENDA
   ============================================ */
div.legend {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 16px !important;
  justify-content: center !important;
  align-items: center !important;
  padding: 14px 20px !important;
  margin: 8px 0 !important;
  background: white !important;
  border-radius: 12px !important;
  box-shadow: 
    0 4px 6px -1px rgba(30, 95, 168, 0.08),
    0 2px 4px -2px rgba(30, 95, 168, 0.06) !important;
  font-size: 13px !important;
  color: #54565f !important;
}

span.legend {
  border-radius: 6px !important;
  border: none !important;
}

span.legend-obal {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

/* ============================================
   DROPDOWN PRO JEDNOTKY
   ============================================ */
select {
  font-family: 'DM Sans', system-ui, sans-serif !important;
  font-size: 14px !important;
  padding: 12px 20px !important;
  border: 2px solid #d1e3f5 !important;
  border-radius: 12px !important;
  background: white !important;
  color: #54565f !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  margin-bottom: 12px !important;
  box-shadow: 0 2px 4px rgba(30, 95, 168, 0.05) !important;
}

select:hover {
  border-color: #2d7cc1 !important;
  box-shadow: 0 4px 8px rgba(30, 95, 168, 0.1) !important;
}

select:focus {
  outline: none !important;
  border-color: #1e5fa8 !important;
  box-shadow: 0 0 0 3px rgba(45, 124, 193, 0.2) !important;
}

/* ============================================
   TLAČÍTKA
   ============================================ */
button {
  font-family: 'DM Sans', system-ui, sans-serif !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  padding: 10px 20px !important;
  margin: 4px !important;
  border: 2px solid #d1e3f5 !important;
  border-radius: 9999px !important;
  background: white !important;
  color: #54565f !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

button:hover {
  background: linear-gradient(135deg, #2d7cc1 0%, #1e5fa8 100%) !important;
  border-color: #1e5fa8 !important;
  color: white !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 8px rgba(30, 95, 168, 0.25) !important;
}

/* ============================================
   RESPONZIVITA
   ============================================ */
@media (max-width: 640px) {
  .month {
    border-radius: 12px !important;
    margin: 2px !important;
  }
  
  .month-name {
    font-size: 13px !important;
    padding: 10px 12px !important;
  }
  
  .month td {
    width: 28px !important;
    height: 28px !important;
    font-size: 11px !important;
  }
  
  .days td {
    font-size: 9px !important;
    padding: 6px 2px !important;
  }
  
  button {
    padding: 8px 16px !important;
    font-size: 12px !important;
  }
}

/* ============================================
   ANIMACE
   ============================================ */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.month {
  animation: fadeIn 0.5s ease forwards !important;
}

/* Staggered animation */
.month:nth-child(1) { animation-delay: 0s !important; }
.month:nth-child(2) { animation-delay: 0.04s !important; }
.month:nth-child(3) { animation-delay: 0.08s !important; }
.month:nth-child(4) { animation-delay: 0.12s !important; }
.month:nth-child(5) { animation-delay: 0.16s !important; }
.month:nth-child(6) { animation-delay: 0.2s !important; }
.month:nth-child(7) { animation-delay: 0.24s !important; }
.month:nth-child(8) { animation-delay: 0.28s !important; }
.month:nth-child(9) { animation-delay: 0.32s !important; }
.month:nth-child(10) { animation-delay: 0.36s !important; }
.month:nth-child(11) { animation-delay: 0.4s !important; }
.month:nth-child(12) { animation-delay: 0.44s !important; }
