/* Deczno – Kalendarium Imprez
   Kolory zgodne z www.deczno.pl: pomarańczowo-czerwone akcenty, białe tło, ciemny tekst. */
:root {
  --deczno-orange: #F5822B;
  --deczno-red:    #E53935;
  --deczno-grad:   linear-gradient(135deg, #F5A623 0%, #F5822B 45%, #E53935 100%);
  --deczno-ink:    #1a1a1a;
  --deczno-muted:  #6b6b6b;
  --deczno-bg:     #ffffff;
  --deczno-soft:   #fafafa;
  --deczno-line:   #ececec;
  --deczno-radius: 14px;
  --deczno-shadow: 0 8px 30px rgba(0,0,0,.08);
  --deczno-shadow-lg: 0 20px 60px rgba(0,0,0,.25);
}

.deczno-ev-today-module,
.deczno-ev-calendar {
  font-family: inherit;
  color: var(--deczno-ink);
  max-width: 1200px;
  margin: 3rem auto;
  padding: 0 1rem;
}

/* ------- Nagłówki ------- */
.deczno-ev-today-header,
.deczno-ev-calendar-header {
  text-align: center;
  margin-bottom: 2rem;
}
.deczno-ev-today-header h2,
.deczno-ev-calendar-header h2 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  margin: 0;
  background: var(--deczno-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
}
.deczno-ev-today-header p,
.deczno-ev-calendar-header p {
  color: var(--deczno-muted);
  margin-top: .5rem;
}

/* Pulsujący wskaźnik „na żywo" */
.deczno-ev-pulse {
  display: inline-block;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--deczno-red);
  margin-right: .5rem;
  vertical-align: middle;
  box-shadow: 0 0 0 rgba(229,57,53,.7);
  animation: deczno-pulse 1.8s infinite;
}
@keyframes deczno-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(229,57,53,.6); }
  70%  { box-shadow: 0 0 0 14px rgba(229,57,53,0); }
  100% { box-shadow: 0 0 0 0 rgba(229,57,53,0); }
}

/* ------- Grid ------- */
.deczno-ev-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}
.deczno-ev-grid-today {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* ------- Karta ------- */
.deczno-ev-card {
  background: var(--deczno-bg);
  border-radius: var(--deczno-radius);
  overflow: hidden;
  box-shadow: var(--deczno-shadow);
  transition: transform .35s ease, box-shadow .35s ease;
  border: 1px solid var(--deczno-line);
}
.deczno-ev-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,.14);
}

.deczno-ev-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.deczno-ev-card.is-today .deczno-ev-thumb::before {
  content: "";
  position: absolute; inset: 0;
  border: 3px solid transparent;
  border-radius: var(--deczno-radius) var(--deczno-radius) 0 0;
  background: var(--deczno-grad) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  z-index: 2;
}

.deczno-ev-badge-today {
  position: absolute;
  top: 12px; left: 12px;
  background: var(--deczno-grad);
  color: #fff;
  font-weight: 800;
  font-size: .75rem;
  padding: .4rem .75rem;
  border-radius: 999px;
  letter-spacing: .04em;
  text-transform: uppercase;
  z-index: 3;
  box-shadow: 0 4px 12px rgba(229,57,53,.35);
  text-shadow: 0 1px 2px rgba(0,0,0,.25);
}

.deczno-ev-date-chip {
  position: absolute;
  top: 12px; right: 12px;
  background: rgba(255,255,255,.95);
  border-radius: 10px;
  padding: .4rem .55rem;
  text-align: center;
  line-height: 1;
  min-width: 46px;
  z-index: 3;
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
}
.deczno-ev-date-chip .d {
  display: block;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--deczno-red);
}
.deczno-ev-date-chip .m {
  display: block;
  font-size: .65rem;
  letter-spacing: .08em;
  color: var(--deczno-ink);
  margin-top: 2px;
}

/* ------- Hover overlay ------- */
.deczno-ev-hover {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,.85) 60%, rgba(0,0,0,.95) 100%);
  color: #fff;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  opacity: 0;
  transition: opacity .35s ease;
  z-index: 2;
}
.deczno-ev-card:hover .deczno-ev-hover,
.deczno-ev-card:focus-within .deczno-ev-hover {
  opacity: 1;
}
.deczno-ev-hover h3 {
  font-size: 1.15rem;
  margin: 0 0 .5rem;
  font-weight: 700;
  line-height: 1.25;
}
.deczno-ev-meta {
  margin: 0 0 .5rem;
}
.deczno-ev-meta p {
  margin: .15rem 0;
  font-size: .85rem;
  opacity: .95;
}
.deczno-ev-desc {
  font-size: .85rem;
  opacity: .85;
  margin: .25rem 0 .85rem;
  line-height: 1.4;
}
.deczno-ev-actions {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

/* ------- Przyciski ------- */
.deczno-btn {
  display: inline-block;
  padding: .55rem 1rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: 0;
  transition: transform .15s ease, box-shadow .15s ease, background .2s;
  font-family: inherit;
}
.deczno-btn:hover { transform: translateY(-1px); }
.deczno-btn-primary {
  background: var(--deczno-grad);
  color: #fff;
  box-shadow: 0 4px 14px rgba(229,57,53,.35);
  text-shadow: 0 1px 2px rgba(0,0,0,.25);
}
.deczno-btn-outline {
  background: transparent;
  color: #fff;
  border: 1.5px solid #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
}
.deczno-btn-outline:hover { background: #fff; color: var(--deczno-ink); text-shadow: none; }

/* ------- Tytuł pod kartą ------- */
.deczno-ev-title-below {
  padding: .85rem 1rem 1rem;
}
.deczno-ev-title-below h4 {
  margin: 0 0 .25rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--deczno-ink);
  line-height: 1.3;
}
.deczno-ev-title-below span {
  font-size: .8rem;
  color: var(--deczno-muted);
}

/* ------- Pusty stan ------- */
.deczno-ev-today-empty,
.deczno-ev-empty {
  text-align: center;
  padding: 2rem;
  background: var(--deczno-soft);
  border-radius: var(--deczno-radius);
  color: var(--deczno-muted);
  border: 1px dashed var(--deczno-line);
}

/* ------- Modal plakatu ------- */
.deczno-ev-modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.9);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  animation: deczno-fade .25s ease;
}
.deczno-ev-modal[hidden] { display: none; }
@keyframes deczno-fade { from {opacity:0;} to {opacity:1;} }
.deczno-ev-modal img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: var(--deczno-radius);
  box-shadow: var(--deczno-shadow-lg);
}
.deczno-ev-modal-close {
  position: absolute;
  top: 20px; right: 24px;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 0;
  background: #fff;
  color: var(--deczno-ink);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  font-weight: 300;
}

/* ------- Mobile: hover -> zawsze widoczne (tap-first) ------- */

/* --- Agenda miesiąca --- */
.deczno-ev-cal-agenda { margin-top: 24px; }
.deczno-ev-cal-agenda-title { margin: 0 0 12px; font-size: 20px; color: #E53935; font-weight: 800; }
.deczno-ev-cal-agenda-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.deczno-ev-cal-agenda-day { display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: start;
  background: #fff; border: 1px solid #f0e6dd; border-radius: 12px; padding: 12px 14px; }
.deczno-ev-cal-agenda-day.is-today { border-color: #F5A623; box-shadow: 0 0 0 2px rgba(245,166,35,.2); }
.deczno-ev-cal-agenda-date { display: flex; flex-direction: column; line-height: 1.1;
  background: linear-gradient(135deg, #F5A623, #E53935); color: #fff; border-radius: 10px; padding: 10px 12px;
  text-shadow: 0 1px 2px rgba(0,0,0,.25); text-align: center; }
.deczno-ev-cal-agenda-date .d { font-size: 28px; font-weight: 900; }
.deczno-ev-cal-agenda-date .m { font-size: 13px; font-weight: 700; text-transform: lowercase; }
.deczno-ev-cal-agenda-date .w { font-size: 11px; opacity: .9; text-transform: uppercase; letter-spacing: .5px; margin-top: 2px; }
.deczno-ev-cal-agenda-events { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.deczno-ev-cal-agenda-pill { display: flex !important; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 10px 14px !important; font-size: 14px !important; line-height: 1.35 !important;
  white-space: normal !important; }
.deczno-ev-cal-agenda-pill .n { display: inline !important; -webkit-line-clamp: unset !important; overflow: visible !important;
  font-weight: 800; }
.deczno-ev-cal-agenda-pill .t { background: rgba(255,255,255,.22); padding: 2px 8px; border-radius: 999px; font-weight: 800; }
.deczno-ev-cal-agenda-pill .loc { flex-basis: 100%; font-weight: 600; font-size: 12px; opacity: .95; }

/* Widoczność siatka vs agenda */
.deczno-ev-cal-days, .deczno-ev-cal-dow { display: grid; }
@media (max-width: 700px) {
  .deczno-ev-cal-days, .deczno-ev-cal-dow { display: none !important; }
  .deczno-ev-cal-agenda-day { grid-template-columns: 92px 1fr; gap: 10px; padding: 10px; }
  .deczno-ev-cal-agenda-date .d { font-size: 22px; }
  .deczno-ev-cal-agenda-date .m { font-size: 12px; }
  .deczno-ev-cal-agenda-date .w { font-size: 10px; }
  .deczno-ev-cal-agenda-pill { font-size: 13px !important; padding: 8px 10px !important; }
}
@media (min-width: 701px) {
  .deczno-ev-cal-agenda { display: none; }
}

@media (hover: none) {
  .deczno-ev-hover {
    position: relative;
    opacity: 1;
    background: var(--deczno-ink);
    padding: 1rem;
  }
  .deczno-ev-thumb {
    aspect-ratio: 4 / 3;
  }
  .deczno-ev-card { display: flex; flex-direction: column; }
}

/* ===== Kalendarz miesięczny ===== */
.deczno-ev-cal { max-width: 1100px; margin: 32px auto; font-family: inherit; color: #222; }
.deczno-ev-cal-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.deczno-ev-cal-header h2 { margin: 0; font-size: 28px; text-align: center; flex: 1;
  background: linear-gradient(90deg, #F5A623, #E53935); -webkit-background-clip: text; background-clip: text; color: transparent; }
.deczno-ev-cal-nav { display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%; background: var(--deczno-grad); color: #fff;
  font-size: 24px; font-weight: 800; text-decoration: none; border: none;
  text-shadow: 0 1px 2px rgba(0,0,0,.25);
  transition: all .2s; box-shadow: 0 4px 12px rgba(229,57,53,.3); }
.deczno-ev-cal-nav:hover { background: linear-gradient(135deg, #E53935, #c62828); color: #fff; transform: translateY(-2px); box-shadow: 0 6px 18px rgba(229,57,53,.4); }
.deczno-ev-cal-grid,
.deczno-ev-cal-dow,
.deczno-ev-cal-days {
  display: grid !important;
  grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
  grid-auto-columns: minmax(0, 1fr) !important;
  gap: 6px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
}
.deczno-ev-cal-dow { margin-bottom: 6px; }
.deczno-ev-cal-dow-cell { text-align: center; font-weight: 700; color: #E53935;
  padding: 8px 0; font-size: 13px; text-transform: uppercase; letter-spacing: .5px; }
.deczno-ev-cal-cell { background: #fff; border: 1px solid #f0e6dd; border-radius: 10px;
  min-height: 120px; padding: 6px; position: relative; display: flex; flex-direction: column;
  min-width: 0 !important; max-width: 100%; overflow: hidden; box-sizing: border-box; }
.deczno-ev-cal-cell.is-empty { background: transparent; border: none; }
.deczno-ev-cal-cell.is-today { border-color: #F5A623; box-shadow: 0 0 0 2px rgba(245,166,35,.25); }
.deczno-ev-cal-cell.has-events { background: linear-gradient(180deg, #fff 0%, #fff8f0 100%); }
.deczno-ev-cal-daynum { font-weight: 700; font-size: 14px; color: #666; margin-bottom: 4px; }
.deczno-ev-cal-cell.is-today .deczno-ev-cal-daynum { color: #E53935; }
.deczno-ev-cal-list,
.deczno-ev-cal-list li { list-style: none; margin: 0; padding: 0; min-width: 0 !important; max-width: 100%; overflow: hidden; box-sizing: border-box; }
.deczno-ev-cal-list { display: flex; flex-direction: column; gap: 3px; }
.deczno-ev-cal-pill { display: block; width: 100%; max-width: 100%; box-sizing: border-box; text-align: left; cursor: pointer;
  background: linear-gradient(135deg, #F5A623, #E53935); color: #fff; border: 0;
  border-radius: 6px; padding: 4px 6px; font-size: 11px; font-weight: 700; line-height: 1.25;
  overflow: hidden; white-space: normal; word-break: break-word; overflow-wrap: anywhere; hyphens: auto; transition: transform .15s, box-shadow .15s;
  text-shadow: 0 1px 2px rgba(0,0,0,.25); }
.deczno-ev-cal-pill .n { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.deczno-ev-cal-pill:hover { transform: translateY(-1px); box-shadow: 0 3px 8px rgba(229,57,53,.35); }
.deczno-ev-cal-pill .t { font-weight: 800; margin-right: 4px; display: none; }
.deczno-ev-cal-pill:hover .t { display: inline-block; }
.deczno-ev-cal-pill:hover .n { display: none; }
/* Agenda pills should keep name + time visible together */
.deczno-ev-cal-agenda-pill .t { display: inline-block !important; }
.deczno-ev-cal-agenda-pill:hover .n { display: inline !important; }
.deczno-ev-cal-more { font-size: 11px; color: #E53935; font-weight: 600; padding: 2px 4px; }

.deczno-ev-cal-detail { position: fixed; inset: 0; background: rgba(0,0,0,.75);
  z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 20px; }
.deczno-ev-cal-detail[hidden] { display: none; }
.deczno-ev-cal-detail-inner { position: relative; background: #fff; border-radius: 14px; max-width: 900px;
  width: 100%; max-height: 90vh; overflow: hidden; display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 0; align-items: stretch; }
.deczno-ev-cal-detail-poster-wrap { background: #111; display: flex; align-items: center; justify-content: center;
  border-radius: 14px 0 0 14px; overflow: hidden; min-height: 0; max-height: 90vh; }
.deczno-ev-cal-detail-poster { width: 100%; height: 100%; object-fit: contain; display: block;
  max-height: 90vh; }
.deczno-ev-cal-detail-body { padding: 28px; overflow: auto; max-height: 90vh; min-width: 0; }
.deczno-ev-cal-detail-body h3 { margin: 0 0 12px; font-size: 24px;
  background: linear-gradient(90deg, #F5A623, #E53935); -webkit-background-clip: text; background-clip: text; color: transparent; }
.deczno-ev-cal-detail-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.deczno-ev-cal-detail-meta span { background: #fff8f0; color: #333; padding: 4px 10px;
  border-radius: 999px; font-size: 13px; border: 1px solid #f0e6dd; }
.deczno-ev-cal-detail-desc { color: #444; line-height: 1.5; margin-bottom: 18px; }
.deczno-ev-cal-detail-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.deczno-ev-cal-detail-close { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px;
  border-radius: 50%; border: 0; background: #fff; color: #E53935; font-size: 24px; cursor: pointer;
  z-index: 3; box-shadow: 0 2px 8px rgba(0,0,0,.25); line-height: 1; }
@media (max-width: 720px) {
  .deczno-ev-cal-cell { min-height: 64px; padding: 4px; }
  .deczno-ev-cal-daynum { font-size: 12px; }
  .deczno-ev-cal-pill { font-size: 10px; padding: 2px 4px; }
  .deczno-ev-cal-pill .n { display: none; }
  .deczno-ev-cal-detail-inner { grid-template-columns: 1fr; grid-template-rows: auto 1fr; max-height: 92vh; }
  .deczno-ev-cal-detail-poster-wrap { border-radius: 14px 14px 0 0; max-height: 45vh; }
  .deczno-ev-cal-detail-poster { max-height: 45vh; }
  .deczno-ev-cal-detail-body { padding: 20px; max-height: 100%; }
}

/* ============================================================
   v1.2.0 — Kompaktowy moduł „Dzisiaj się dzieje!"
   ============================================================ */
.deczno-ev-today-module {
    max-width: 900px;
    margin: 1.5rem auto;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #fff8f0 0%, #fff 100%);
    border: 1px solid #f5d9bf;
    border-left: 4px solid var(--deczno-orange);
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(245,130,43,.08);
}
.deczno-ev-today-module .deczno-ev-today-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: .6rem;
    text-align: left;
    margin-bottom: .85rem;
    flex-wrap: wrap;
}
.deczno-ev-today-module .deczno-ev-today-header h2 {
    font-size: 1.25rem;
    margin: 0;
}
.deczno-ev-today-module .deczno-ev-today-header p {
    margin: 0;
    font-size: .85rem;
    color: var(--deczno-muted);
    margin-left: auto;
}
.deczno-ev-today-module .deczno-ev-pulse {
    width: 9px; height: 9px; margin-right: 0;
}
.deczno-ev-today-module .deczno-ev-grid-today {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: .85rem;
}
.deczno-ev-today-module .deczno-ev-grid-today .deczno-ev-thumb {
    aspect-ratio: 16 / 10;
}
.deczno-ev-today-module .deczno-ev-grid-today .deczno-ev-card h4 {
    font-size: .95rem;
}
.deczno-ev-today-module .deczno-ev-today-empty {
    padding: .5rem 0;
    font-size: .9rem;
    color: var(--deczno-muted);
    background: transparent;
    border: none;
}
.deczno-ev-today-module .deczno-ev-today-empty p { margin: 0; }
