/* Kalendář – jen layout a mřížka, “glass” řeší theme (.ph-card, .ph-bubble) */
.phac-wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 12px 26px;
  box-sizing: border-box;
}

.phac-head { margin-bottom: 12px; }
.phac-nav { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.phac-title { font-size: 1.25rem; font-weight: 800; }

.phac-navbtn{
  display:inline-flex; align-items:center; justify-content:center;
  width: 44px; height: 44px; border-radius: 999px;
  text-decoration:none;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
}

.phac-legend { display:flex; gap:14px; flex-wrap:wrap; align-items:center; }

.phac-grid{
  display:grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}

.phac-wday{
  opacity: .80;
  font-weight: 700;
  text-align:center;
  padding: 6px 0;
}

.phac-cell{
  position: relative;
  border-radius: 16px;
  padding: 10px;
  min-height: 68px;
  text-decoration:none;

  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
}

.phac-cell--empty{
  background: transparent;
  border: 1px dashed rgba(255,255,255,.08);
}

.phac-cell--has{ border-color: rgba(255,255,255,.22); }
.phac-cell--selected{ outline: 2px solid rgba(92, 225, 255, .35); }

.phac-daynum{ font-weight: 900; opacity: .95; }

.phac-chips{ display:flex; gap:6px; align-items:center; margin-top: 10px; }
.phac-chip{ width: 10px; height: 10px; border-radius: 999px; background: rgba(255,255,255,.45); display:inline-block; }
.phac-more{ font-size: 12px; opacity: .75; }

.phac-detail{ margin-top: 14px; padding: 18px 18px; }
.phac-detail-title{ font-weight: 900; margin-bottom: 10px; }
.phac-detail-body{ opacity:.9; }

.phac-ev{ padding: 10px 0; border-top: 1px solid rgba(255,255,255,.10); }
.phac-ev:first-of-type{ border-top: 0; padding-top: 0; }
.phac-ev-head{ display:flex; align-items:center; gap:10px; }
.phac-ev-title{ margin: 0; font-size: 1.05rem; }
.phac-ev-body{ opacity: .95; margin-top: 8px; }

.phac-dot{ width: 10px; height: 10px; border-radius: 999px; background: rgba(255,255,255,.45); display:inline-block; }
.phac-dot--energy  { background: rgba(255,255,255,.40); }
.phac-dot--moon_sign { background: rgba(190,220,255,.62); }
.phac-dot--moon    { background: rgba(255,255,255,.70); }
.phac-dot--retro   { background: rgba(255,255,255,.55); }
.phac-dot--ingress { background: rgba(255,255,255,.50); }
.phac-dot--aspect  { background: rgba(255,255,255,.60); }
.phac-dot--general { background: rgba(255,255,255,.40); }
#phac-day-detail.phac-flash{
  outline: 2px solid rgba(120,220,255,.55);
  box-shadow: 0 0 0 6px rgba(120,220,255,.15);
  border-radius: 18px;
  transition: box-shadow .3s ease, outline .3s ease;
}
#phac-overlay{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}

#phac-overlay.is-open{
  display: block;
}

.phac-overlay__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(6px);
}

.phac-overlay__panel{
  position: absolute;
  left: 50%;
  top: 16%;
  transform: translateX(-50%);
  width: min(820px, calc(100% - 28px));
  max-height: 70vh;
  overflow: auto;

  border-radius: 22px;
  padding: 18px 18px 16px;

  /* styl podobný tvým “bublinám” */
  background: rgba(12, 18, 28, .78);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 18px 60px rgba(0,0,0,.45);
}

.phac-overlay__close{
  position: sticky;
  top: 0;
  float: right;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.9);
  font-size: 26px;
  line-height: 34px;
  cursor: pointer;
}

.phac-overlay__content{
  clear: both;
}

/* Mobil: bottom sheet */
@media (max-width: 720px){
  .phac-overlay__panel{
    top: auto;
    bottom: 12px;
    transform: translateX(-50%);
    max-height: 74vh;
    border-radius: 22px;
  }
}
#phac-overlay{position:fixed;inset:0;z-index:9999;display:none}
#phac-overlay.is-open{display:block}
.phac-overlay__backdrop{position:absolute;inset:0;background:rgba(0,0,0,.45);backdrop-filter:blur(6px)}
.phac-overlay__panel{
  position:absolute;left:50%;top:16%;transform:translateX(-50%);
  width:min(820px,calc(100% - 28px));max-height:70vh;overflow:auto;
  border-radius:22px;padding:18px 18px 16px;
  background:rgba(12,18,28,.78);
  border:1px solid rgba(255,255,255,.10);
  box-shadow:0 18px 60px rgba(0,0,0,.45)
}
.phac-overlay__close{
  position:sticky;top:0;float:right;width:38px;height:38px;border-radius:12px;
  border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.06);
  color:rgba(255,255,255,.9);font-size:26px;line-height:34px;cursor:pointer
}
.phac-overlay__content{clear:both}
@media (max-width:720px){
  .phac-overlay__panel{top:auto;bottom:12px;max-height:74vh}
}
.phac-ev-head{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:8px;
}
.phac-ev-type{
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.85);
  white-space: nowrap;
}
.phac-ev-title{
  margin:0;
}
.phac-ev-head{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:8px;
}
.phac-ev-type{
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.85);
  white-space: nowrap;
}
.phac-ev-title{
  margin:0;
}
/* === MOBILE: vystředění kalendáře + jistý vnitřní okraj === */
.phac-grid{
  width: 100%;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  justify-content: center; /* když grid/flex fallback */
}

@media (max-width: 520px){
  .phac-wrap{
    padding-left: 14px;
    padding-right: 14px;
  }

  /* samotná tabulka – ať má „dýchání“ z obou stran */
  .phac-grid{
    padding-left: 6px;
    padding-right: 6px;
    box-sizing: border-box;
  }

  /* pojistka: kdyby se někde dědilo alignování doprava */
  .phac-grid,
  .phac-grid *{
    box-sizing: border-box;
  }
}
/* === HLAVNÍ UDÁLOST DNE (energie) === */
.phac-ev--main{
  padding: 14px 14px;
  margin-bottom: 10px;
  border-radius: 14px;

  background: rgba(120,220,255,.08);
  border: 1px solid rgba(120,220,255,.25);
  box-shadow: 0 0 18px rgba(120,220,255,.12);
}

.phac-ev--main .phac-ev-title{
  font-size: 1.15rem;
  font-weight: 800;
}

.phac-ev--main .phac-ev-body{
  font-size: 1.02rem;
  opacity: 1;
}
/* === SEKUNDÁRNÍ UDÁLOSTI === */
.phac-ev{
  opacity: .85;
}

.phac-ev:not(.phac-ev--main){
  padding-left: 6px;
}
/* === MALÝ TEXT V BUŇCE === */
.phac-mini{
  font-size: 11px;
  opacity: .75;
  margin-top: 6px;
  line-height: 1.2;
}
/* === HOVER + AKTIVNÍ DEN === */
.phac-cell:hover{
  transform: translateY(-2px);
  border-color: rgba(120,220,255,.35);
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
  transition: all .2s ease;
}
/* === DNES === */
.phac-cell--today{
  border: 1px solid rgba(120,220,255,.6);
  box-shadow: 0 0 12px rgba(120,220,255,.25);
  background: rgba(120,220,255,.08);
}

.phac-cell--today .phac-daynum{
  color: #78dcff;
}
.phac-grid {
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

@media (max-width: 480px) {
    .phac-grid {
        gap: 10px;
    }

    .phac-day {
        padding: 10px 6px;
        min-height: 70px;
    }
}
.phac-calendar-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}
.phac-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    width: 100%;
}
@media (max-width: 520px){
  .phac-grid{
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (max-width: 520px){
  .phac-wday{
    display: none;
  }
}
.phac-cell--today{
  border: 1px solid rgba(120,220,255,.8);
  box-shadow: 0 0 18px rgba(120,220,255,.35);
  background: rgba(120,220,255,.12);
}
.phac-cell:active{
  transform: scale(0.97);
  transition: transform .1s ease;
}
@media (max-width: 520px){
  .phac-grid{
    gap: 12px;
  }
}
.phac-chip--general {
    display: none;
}
/* === PHAC reviewed fixes: kalendář zůstává kalendářem i na mobilu === */
@media (max-width: 520px){
  .phac-grid{
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    gap: 5px !important;
    padding-left: 0;
    padding-right: 0;
  }

  .phac-wday{
    display: block !important;
    font-size: 11px;
    padding: 3px 0;
  }

  .phac-cell{
    min-height: 52px;
    padding: 6px 3px;
    border-radius: 12px;
  }

  .phac-daynum{
    font-size: 13px;
  }

  .phac-chips{
    gap: 3px;
    margin-top: 5px;
  }

  .phac-chip,
  .phac-dot{
    width: 8px;
    height: 8px;
  }

  .phac-mini{
    font-size: 9px;
    line-height: 1.1;
    margin-top: 4px;
  }
}
