/* =========================================================
   Pod Hvězdami – FREE birth form
   Sjednoceno s cosmic/glass vzhledem webu
========================================================= */

/* Bezpečnost proti mobilnímu horizontálnímu přetékání.
   Důležité: .ph-free-card má vlastní padding, proto musí počítat šířku včetně paddingu. */
.ph-free-card,
.ph-free-card *,
.ph-free-card *::before,
.ph-free-card *::after{
  box-sizing: border-box;
}

.ph-free-card{
  max-width: calc(100vw - 28px);
}

.ph-free-form,
.ph-free-form__grid,
.ph-free-field{
  max-width: 100%;
}

.ph-free-field input[type="date"],
.ph-free-field input[type="time"],
.ph-free-field input[type="text"]{
  max-width: 100%;
}

/* =========================================================
   Mobile overflow hardening
   iOS/Safari date/time inputs can keep an intrinsic width
   unless inline-size/min-inline-size/appearance are forced.
========================================================= */
.ph-free-form{
  width: 100%;
  min-width: 0;
  overflow: visible;
}

.ph-free-form__grid{
  width: 100%;
  min-width: 0;
}

.ph-free-field{
  width: 100%;
  min-width: 0;
}

.ph-free-field input[type="date"],
.ph-free-field input[type="time"],
.ph-free-field input[type="text"]{
  display: block;
  inline-size: 100%;
  width: 100% !important;
  max-inline-size: 100%;
  max-width: 100% !important;
  min-inline-size: 0;
  min-width: 0 !important;
  -webkit-appearance: none;
  appearance: none;
}

.ph-free-card{
  position: relative;
  isolation: isolate;
  width: min(1120px, calc(100% - 28px));
  margin: clamp(18px, 3vw, 34px) auto;
  padding: clamp(18px, 3vw, 28px);
  border-radius: 28px;
  color: rgba(235,242,255,.92);
  background:
    linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.025)),
    rgba(10,14,26,.50);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow:
    0 22px 80px rgba(0,0,0,.48),
    inset 0 1px 0 rgba(255,255,255,.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
}

.ph-free-card__glow{
  position: absolute;
  inset: -40% -20% auto -20%;
  height: 220px;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(closest-side at 20% 40%, rgba(122,92,255,.28), transparent 70%),
    radial-gradient(closest-side at 70% 20%, rgba(61,220,255,.16), transparent 70%);
  filter: blur(18px);
  opacity: .9;
}

.ph-free-card__head{
  max-width: 760px;
  margin-bottom: 18px;
}

.ph-free-card__eyebrow{
  margin: 0 0 6px;
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(98,240,232,.78);
  font-weight: 800;
}

.ph-free-card__title{
  margin: 0;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.1;
  color: rgba(255,255,255,.96);
  text-shadow: 0 14px 40px rgba(0,0,0,.42);
}

.ph-free-card__lead{
  margin: 9px 0 0;
  max-width: 680px;
  color: rgba(226,234,255,.72);
  line-height: 1.55;
}

.ph-free-form{
  margin: 0;
}

.ph-free-form__grid{
  display: grid;
  grid-template-columns: minmax(160px, .8fr) minmax(130px, .55fr) minmax(260px, 1.4fr);
  gap: 12px;
  align-items: end;
}

.ph-free-field{
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.ph-free-field__label{
  color: rgba(235,242,255,.72);
  font-size: 13px;
  font-weight: 750;
  letter-spacing: .01em;
}

.ph-free-field input[type="date"],
.ph-free-field input[type="time"],
.ph-free-field input[type="text"]{
  width: 100%;
  box-sizing: border-box;
  min-height: 46px;
  padding: 11px 13px;
  border-radius: 16px;
  background: rgba(5,8,18,.52);
  border: 1px solid rgba(255,255,255,.13);
  color: rgba(245,248,255,.94);
  font: inherit;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease, transform .15s ease;
  color-scheme: dark;
}

.ph-free-field input::placeholder{
  color: rgba(235,242,255,.38);
}

.ph-free-field input:hover{
  border-color: rgba(255,255,255,.22);
  background: rgba(7,11,24,.62);
}

.ph-free-field input:focus{
  border-color: rgba(98,240,232,.54);
  box-shadow:
    0 0 0 3px rgba(98,240,232,.12),
    0 14px 36px rgba(0,0,0,.24);
}

.ph-free-field input:disabled{
  opacity: .55;
  cursor: not-allowed;
}

.ph-free-form__meta{
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
  margin: 14px 0 0;
}

.ph-free-check{
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 30px;
  color: rgba(226,234,255,.74);
  font-size: 14px;
  line-height: 1.3;
  cursor: pointer;
}

.ph-free-check input{
  width: 17px;
  height: 17px;
  accent-color: #7a5cff;
}

.ph-free-form__actions{
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
}

.ph-free-submit{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  border: 0;
  border-radius: 999px;
  color: #061020;
  background: linear-gradient(135deg, #7a5cff, #3ddcff);
  box-shadow:
    0 18px 48px rgba(0,0,0,.32),
    0 0 0 1px rgba(255,255,255,.10) inset,
    0 0 26px rgba(61,220,255,.16);
  font: inherit;
  font-weight: 900;
  letter-spacing: .01em;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .15s ease, filter .15s ease, box-shadow .15s ease;
}

.ph-free-submit:hover{
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow:
    0 22px 58px rgba(0,0,0,.36),
    0 0 0 1px rgba(255,255,255,.12) inset,
    0 0 34px rgba(61,220,255,.20);
}

.ph-free-submit:active{
  transform: translateY(0);
}

.ph-free-submit:disabled{
  cursor: wait;
  opacity: .78;
  transform: none;
}

.ph-free-submit__busy{
  display: none;
}

.ph-free-form.is-loading .ph-free-submit__idle{
  display: none;
}

.ph-free-form.is-loading .ph-free-submit__busy{
  display: inline;
}

.ph-free-form__note{
  margin: 0;
  color: rgba(226,234,255,.58);
  font-size: 13px;
  line-height: 1.45;
}

.ph-free-status{
  margin-top: 14px;
  padding: 11px 13px;
  border-radius: 16px;
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.10);
  color: rgba(235,242,255,.86);
  font-size: 14px;
  line-height: 1.45;
}

.ph-free-status.is-error{
  border-color: rgba(255,120,120,.34);
  background: rgba(255,80,80,.08);
}

.ph-free-status.is-success{
  border-color: rgba(98,240,232,.26);
  background: rgba(98,240,232,.07);
}

@media (max-width: 920px){
  .ph-free-form__grid{
    grid-template-columns: 1fr 1fr;
  }
  .ph-free-field--place{
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px){
  .ph-free-card{
    width: calc(100% - 20px);
    inline-size: calc(100% - 20px);
    max-width: calc(100% - 20px);
    margin-left: 10px;
    margin-right: 10px;
    padding: 16px;
    border-radius: 22px;
  }

  .ph-free-form__grid{
    grid-template-columns: minmax(0, 1fr);
    gap: 11px;
  }

  .ph-free-field,
  .ph-free-field input[type="date"],
  .ph-free-field input[type="time"],
  .ph-free-field input[type="text"]{
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .ph-free-form__meta,
  .ph-free-form__actions{
    align-items: stretch;
    flex-direction: column;
  }

  .ph-free-submit{
    width: 100%;
  }

  .ph-free-form__note{
    text-align: left;
  }
}

@media (max-width: 380px){
  .ph-free-card{
    width: calc(100% - 16px);
    inline-size: calc(100% - 16px);
    max-width: calc(100% - 16px);
    margin-left: 8px;
    margin-right: 8px;
    padding: 14px;
  }

  .ph-free-card__title{
    font-size: 21px;
  }

  .ph-free-field input[type="date"],
  .ph-free-field input[type="time"],
  .ph-free-field input[type="text"]{
    min-height: 44px;
    padding-left: 11px;
    padding-right: 11px;
  }
}

@media (prefers-reduced-transparency: reduce){
  .ph-free-card,
  .ph-free-field input[type="date"],
  .ph-free-field input[type="time"],
  .ph-free-field input[type="text"]{
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* =========================================================
   PH 0.2.11 – shortcode layout guard
   The DE/CZ shortcode owns its own content width so the page template
   cannot shrink the radix or interpretation bubbles unexpectedly.
========================================================= */
.ph-free-horoscope,
.entry-content .ph-free-horoscope{
  box-sizing: border-box;
  width: min(780px, calc(100% - 28px));
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
  overflow: visible;
}

.ph-free-horoscope *,
.ph-free-horoscope *::before,
.ph-free-horoscope *::after{
  box-sizing: border-box;
}

.ph-free-horoscope > .ph-free-card,
.ph-free-horoscope > .ph-bubble.ph-radix-card,
.ph-free-horoscope > .ph-interpretation-wrap{
  width: 100% !important;
  max-width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.ph-free-horoscope > .ph-free-card{
  margin-top: clamp(18px, 3vw, 34px);
  margin-bottom: 18px;
}

.ph-free-horoscope .ph-radix-card{
  min-height: 96px;
  overflow: hidden;
}

.ph-free-horoscope .ph-radix-canvas svg{
  display: block;
  width: min(100%, 680px);
  height: auto;
  margin: 0 auto;
}

.ph-free-horoscope .ph-interpretation-wrap{
  padding: 0;
  margin-top: 18px !important;
}

.ph-free-horoscope .ph-interpretation,
.ph-free-horoscope #ph-interpretation{
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  width: 100%;
  max-width: 100%;
}

.ph-free-horoscope .ph-interpretation > .ph-bubble,
.ph-free-horoscope #ph-interpretation > .ph-bubble{
  width: auto !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 18px 20px;
}

.ph-free-horoscope .ph-bubble--status{
  grid-column: 1 / -1;
}

.ph-free-horoscope .ph-bubble-title{
  margin-top: 0;
}

.ph-free-horoscope .ph-bubble-text{
  overflow-wrap: anywhere;
}

@media (max-width: 820px){
  .ph-free-horoscope,
  .entry-content .ph-free-horoscope{
    width: calc(100% - 20px);
  }

  .ph-free-horoscope .ph-interpretation,
  .ph-free-horoscope #ph-interpretation{
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
}
