/* /assets/css/aa-calendar.css  */
/* =========================================================
   Aura Adriatica – Fancy Monthly Calendar
   =========================================================
   Designed to match style.css (fonts, colors, spacing)
   Works with aa-calendar.js
   ========================================================= */

.aa-ical-calendar {
  max-width: 760px;
  margin: 0 auto;
  padding: 1rem;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  box-shadow: var(--card-shadow);
  color: var(--text);
  font-family: 'Roboto', system-ui, sans-serif;
}

/* --- Header --- */
.aa-cal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .8rem;
}
.aa-cal__month {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--brand-blue);
}
.aa-cal__nav {
  display: flex;
  gap: .3rem;
}
.aa-cal__btn {
  border: 1px solid var(--card-border);
  background: #fff;
  border-radius: 8px;
  color: var(--brand-blue);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  padding: .25rem .65rem;
  transition: all .15s ease;
}
.aa-cal__btn:hover {
  background: var(--brand-blue);
  color: #fff;
  border-color: var(--brand-blue);
  transform: translateY(-1px);
}

/* --- Days of week --- */
.aa-cal__dow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font: 700 .9rem 'Poppins',sans-serif;
  color: var(--brand-onyx);
  margin-bottom: .4rem;
}

/* --- Grid of days --- */
.aa-cal__days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: .35rem;
}

.aa-cal__day {
  position: relative;
  background: #f9fbfd;
  border-radius: 10px;
  text-align: center;
  min-height: 64px;
  padding: .25rem;
  font-weight: 600;
  color: var(--text);
  border: 1px solid transparent;
  transition: all .15s ease;
}
.aa-cal__day:hover {
  border-color: var(--brand-blue);
  transform: translateY(-1px);
  box-shadow: 0 2px 10px rgba(10,26,47,.08);
}
.aa-cal__day--today {
  border: 1px solid var(--brand-blue);
  background: #eef6ff;
}
.aa-cal__day--other {
  opacity: .35;
}
.aa-cal__num {
  font-size: .95rem;
  position: relative;
  z-index: 2;
}

/* --- Booked range --- */
.aa-cal__booked {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(77,166,255,.18), rgba(77,166,255,.26));
  border-radius: 10px;
  z-index: 1;
}
.aa-cal__dot {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-blue);
  z-index: 3;
}

/* --- Legend --- */
.aa-cal__legend {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: .9rem;
  font-size: .9rem;
  color: var(--muted);
}
.aa-cal__legend i {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--brand-blue);
  margin-right: .4rem;
}

/* --- Animations / transitions --- */
@media (prefers-reduced-motion: no-preference) {
  .aa-cal__day,
  .aa-cal__btn {
    transition: all .18s ease;
  }
}

/* --- Mobile --- */
@media (max-width: 680px) {
  .aa-ical-calendar {
    padding: .8rem;
  }
  .aa-cal__month {
    font-size: 1.1rem;
  }
  .aa-cal__day {
    min-height: 54px;
    font-size: .9rem;
  }
}
/* ===== Theme per apartment (auto by <body data-apt-slug>) ===== */
body[data-apt-slug="olive"] .aa-ical-calendar{
  /* premapiraj brand varijable unutar kalendara */
  --brand-blue: var(--brand-olive);
  --brand-blue-hover: var(--brand-olive-hover);
}

body[data-apt-slug="onyx"] .aa-ical-calendar{
  --brand-blue: var(--brand-onyx);
  --brand-blue-hover: var(--brand-onyx-hover);
}

/* (nije nužno, ali ako želiš i naslov iznad kalendara u temi) */
body[data-apt-slug="olive"] .aa-cal-title { color: var(--brand-olive); }
body[data-apt-slug="onyx"]  .aa-cal-title { color: var(--brand-onyx); }

/* =========================
   COMPACT VARIANT
   ========================= */
.aa-ical--compact {
  max-width: 640px;
  padding: .6rem .7rem;
}
.aa-ical--compact .aa-cal__month { font-size: 1.05rem; }
.aa-ical--compact .aa-cal__btn { padding: .2rem .5rem; font-size: .9rem; border-radius: 8px; }
.aa-ical--compact .aa-cal__dow { margin-bottom: .25rem; font-size: .8rem; }
.aa-ical--compact .aa-cal__days { gap: .25rem; }
.aa-ical--compact .aa-cal__day { min-height: 48px; padding: .2rem; border-radius: 8px; }
.aa-ical--compact .aa-cal__num { font-size: .9rem; }
.aa-ical--compact .aa-cal__legend { margin-top: .6rem; font-size: .85rem; }

/* =========================
   CLEARER BOOKED vs FREE
   ========================= */

/* Free (default) */
.aa-cal__day {
  background: #fff;
  border: 1px solid var(--card-border);
}

/* Booked: punija ploha + suptilna šrafura + jači rub */
.aa-cal__booked {
  background:
    repeating-linear-gradient(
      135deg,
      color-mix(in srgb, var(--brand-blue) 12%, #ffffff) 0 6px,
      color-mix(in srgb, var(--brand-blue) 18%, #ffffff) 6px 12px
    );
  border: 1px solid color-mix(in srgb, var(--brand-blue) 38%, #000);
  border-radius: inherit;
  inset: -1px;
  z-index: 1;
}

/* Broj dana na booked – bijeli radi kontrasta */
.aa-cal__day .aa-cal__booked ~ .aa-cal__num {
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
}

/* Diskretniji dot (ostaje semantički marker) */
.aa-cal__dot {
  width: 5px; height: 5px; bottom: 6px;
  background: #fff; opacity: .85;
  box-shadow: 0 0 0 2px var(--brand-blue);
}

/* Današnji dan – blagi highlight rub */
.aa-cal__day--today { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--brand-blue) 60%, #fff); }

/* Compact hover smireniji */
.aa-ical--compact .aa-cal__day:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(10,26,47,.08);
}

/* Availability note (iznad kalendara) */
.aa-cal-note{
  margin: .25rem 0 1rem;
  color: var(--muted, #667085);
  font-size: .98rem;
  line-height: 1.5;
}

/* =========================
   LEGEND – dodaj i "Available"
   ========================= */
.aa-cal__legend .badge {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .2rem .4rem; border-radius: 8px; border: 1px solid var(--card-border);
  background: #fff;
}
.aa-cal__legend .swatch {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--brand-blue);
}
.aa-cal__legend .swatch--free {
  background: #fff; border: 1px solid var(--card-border);
}

/* =========================
   ONYX THEME – posvijetli ton
   ========================= */
body[data-apt-slug="onyx"] .aa-ical-calendar {
  --brand-blue: #5a7db1;      /* svježa slate-plava */
  --brand-blue-hover: #4a6ea0;
}
body[data-apt-slug="onyx"] .aa-cal-title { color: #5a7db1; }
body[data-apt-slug="onyx"] .aa-cal__booked {
  background:
    repeating-linear-gradient(
      135deg,
      color-mix(in srgb, #5a7db1 14%, #ffffff) 0 6px,
      color-mix(in srgb, #5a7db1 22%, #ffffff) 6px 12px
    );
  border-color: color-mix(in srgb, #5a7db1 45%, #000);
}
