/*
Theme Name: Detail Glass
Theme URI: https://example.invalid/detail-glass
Author: Detail Booking
Description: Apple Liquid Glass ihletésű WordPress téma a Detail Booking foglalóhoz. Cserélhető háttérkép, egyedi logó, szerkeszthető lábléc és beágyazásbarát teljes szélességű sablon.
Version: 0.3.2
Requires at least: 6.5
Requires PHP: 8.1
Text Domain: detail-glass
License: GPL-2.0-or-later
*/

:root {
  --dg-text: #f5f7fa;
  --dg-muted: rgba(245,247,250,.72);
  --dg-glass: rgba(20,24,30,.28);
  --dg-glass-strong: rgba(20,24,30,.46);
  --dg-line: rgba(255,255,255,.20);
  --dg-shadow: 0 24px 80px rgba(0,0,0,.24);
  --dg-radius: 28px;
  --dg-content-width: 1480px;
  --dg-overlay-opacity: .32;
}

* { box-sizing: border-box; }
html {
  min-height: 100%;
  background-color: #15191e;
  background-image: var(--dg-background-image, none);
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  background-attachment: fixed;
}
body {
  min-height: 100vh;
  margin: 0;
  color: var(--dg-text);
  background: transparent !important;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* The actual site background is a fixed viewport layer instead of the body
   background. This keeps the image completely static while content scrolls
   and also fills iPhone safe-area regions when viewport-fit=cover is used. */
.dg-background {
  position: fixed;
  top: calc(-1 * env(safe-area-inset-top, 0px));
  right: calc(-1 * env(safe-area-inset-right, 0px));
  bottom: calc(-1 * env(safe-area-inset-bottom, 0px));
  left: calc(-1 * env(safe-area-inset-left, 0px));
  z-index: 0;
  background-color: #15191e;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  pointer-events: none;
  transform: translateZ(0);
}

.dg-background::before,
.dg-background::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.dg-background::before {
  background: rgba(5,8,12,var(--dg-overlay-opacity));
}

.dg-background::after {
  background: linear-gradient(180deg, rgba(0,0,0,.08), rgba(0,0,0,.18));
}

/* WordPress custom-background writes the chosen image onto body. Suppress it;
   the fixed .dg-background layer above is the single source of truth. */
body.custom-background {
  background-image: none !important;
  background-color: transparent !important;
  background-attachment: initial !important;
}

a { color: inherit; }
img { max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; }

.dg-site {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.dg-header {
  position: relative;
  z-index: 20;
  width: min(calc(100% - 32px), var(--dg-content-width));
  margin: 18px auto 0;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--dg-line);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.08));
  box-shadow: 0 14px 44px rgba(0,0,0,.16), inset 0 1px 0 rgba(255,255,255,.24);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
}

.dg-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  color: #fff;
  text-decoration: none;
}

.dg-brand__mark {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(255,255,255,.90), rgba(225,234,242,.62));
  color: #0a84ff;
  box-shadow: inset 0 1px 0 #fff, 0 8px 22px rgba(0,0,0,.14);
  flex: 0 0 38px;
}

.dg-brand__text { min-width: 0; }
.dg-brand__text strong,
.dg-brand__text span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dg-brand__text strong { font-size: .95rem; letter-spacing: -.01em; }
.dg-brand__text span { margin-top: 2px; font-size: .72rem; color: var(--dg-muted); }

.dg-nav ul {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.dg-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 999px;
  color: rgba(255,255,255,.82);
  text-decoration: none;
  font-size: .82rem;
  font-weight: 650;
}
.dg-nav a:hover,
.dg-nav .current-menu-item > a {
  color: #fff;
  background: rgba(255,255,255,.13);
}

.dg-main {
  width: min(calc(100% - 32px), var(--dg-content-width));
  margin: 26px auto 54px;
  flex: 1;
}

.dg-content {
  border: 1px solid var(--dg-line);
  border-radius: var(--dg-radius);
  background: linear-gradient(180deg, rgba(20,24,30,.34), rgba(20,24,30,.22));
  box-shadow: var(--dg-shadow), inset 0 1px 0 rgba(255,255,255,.16);
  backdrop-filter: blur(24px) saturate(145%);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
  padding: clamp(22px, 4vw, 52px);
}

.dg-content--transparent {
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 0;
}

.dg-content > :first-child { margin-top: 0; }
.dg-content > :last-child { margin-bottom: 0; }

.dg-page-title {
  margin: 0 0 22px;
  font-size: clamp(2rem, 5vw, 4.3rem);
  line-height: .98;
  letter-spacing: -.05em;
}

.dg-entry-content { color: rgba(255,255,255,.92); }
.dg-entry-content p { line-height: 1.72; }
.dg-entry-content h1,
.dg-entry-content h2,
.dg-entry-content h3,
.dg-entry-content h4 { color: #fff; letter-spacing: -.03em; }

.dg-footer {
  width: min(calc(100% - 32px), var(--dg-content-width));
  margin: auto auto 18px;
  padding: 10px 14px;
  text-align: center;
  color: rgba(255,255,255,.58);
  font-size: .72rem;
}

/* Detail Booking integration */
body .dbook,
body .dbook-calendar {
  max-width: none;
  margin-left: auto;
  margin-right: auto;
}

body .dbook__topbar,
body .dbook__main,
body .dbook__summary,
body .dbook-calendar {
  box-shadow: 0 24px 70px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.88);
}

/* WordPress defaults */
.alignwide { max-width: 1200px; margin-left: auto; margin-right: auto; }
.alignfull { width: 100%; }
.wp-block-image img { border-radius: 18px; }

@media (max-width: 900px) {
  body { background-attachment: scroll; }
  .dg-header { margin-top: 10px; }
  .dg-main { margin-top: 18px; }
  .dg-nav { display: none; }
}

@media (max-width: 640px) {
  .dg-header,
  .dg-main,
  .dg-footer { width: min(calc(100% - 20px), var(--dg-content-width)); }
  .dg-header { border-radius: 20px; }
  .dg-content { border-radius: 22px; padding: 20px; }
  .dg-content--transparent { padding: 0; }
}


/* v0.2 — custom logo, optional title, editable footer */
.dg-brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.dg-logo {
  display: flex;
  align-items: center;
  min-width: 0;
}

.dg-logo .custom-logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.dg-logo .custom-logo {
  display: block;
  width: auto;
  height: clamp(34px, 4vw, 50px);
  max-width: min(260px, 34vw);
  object-fit: contain;
}

.dg-brand-text {
  display: block;
  min-width: 0;
  color: #fff;
  text-decoration: none;
}

.dg-brand-text strong,
.dg-brand-text span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dg-brand-text strong { font-size: .95rem; letter-spacing: -.01em; }
.dg-brand-text span { margin-top: 2px; font-size: .72rem; color: var(--dg-muted); }

/* The old decorative placeholder is no longer used. */
.dg-brand__mark { display: none !important; }

.dg-footer {
  margin-bottom: 18px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  flex-wrap: wrap;
  border: 1px solid var(--dg-line);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,.13), rgba(255,255,255,.07));
  box-shadow: 0 14px 44px rgba(0,0,0,.14), inset 0 1px 0 rgba(255,255,255,.20);
  backdrop-filter: blur(22px) saturate(145%);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
  color: rgba(255,255,255,.68);
  text-align: left;
  font-size: .74rem;
}

.dg-footer__menu ul,
.dg-footer__socials {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dg-footer__menu a,
.dg-footer__socials a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  color: rgba(255,255,255,.74);
  text-decoration: none;
  font-weight: 620;
}

.dg-footer__menu a:hover,
.dg-footer__socials a:hover {
  color: #fff;
  background: rgba(255,255,255,.12);
}

/* Detail Booking: the left circular progress badge is intentionally hidden.
   The numbered step navigation remains as the only progress indication. */
body .dbook__progress-orb { display: none !important; }
body .dbook__topbar { justify-content: flex-end !important; }
body .dbook__steps { margin-left: auto; }

@media (max-width: 900px) {
  .dg-logo .custom-logo { max-width: 220px; }
}

@media (max-width: 640px) {
  .dg-brand-wrap { min-width: 0; }
  .dg-logo .custom-logo { max-width: 190px; height: 38px; }
  .dg-footer { align-items: flex-start; flex-direction: column; }
  .dg-footer__menu ul,
  .dg-footer__socials { flex-wrap: wrap; }
  body .dbook__topbar { justify-content: center !important; }
  body .dbook__steps { width: 100%; margin-left: 0; }
}

/* v0.3 — mobile navigation and responsive integration */
.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.dg-menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,.20);
  border-radius: 14px;
  background: rgba(255,255,255,.10);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.dg-menu-toggle__icon {
  width: 18px;
  height: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.dg-menu-toggle__icon i {
  display: block;
  height: 1.5px;
  width: 100%;
  border-radius: 99px;
  background: currentColor;
  transform-origin: center;
  transition: transform .22s ease, opacity .18s ease;
}

.dg-header.is-menu-open .dg-menu-toggle__icon i:nth-child(1) { transform: translateY(6.25px) rotate(45deg); }
.dg-header.is-menu-open .dg-menu-toggle__icon i:nth-child(2) { opacity: 0; }
.dg-header.is-menu-open .dg-menu-toggle__icon i:nth-child(3) { transform: translateY(-6.25px) rotate(-45deg); }

@media (max-width: 900px) {
  html, body { max-width: 100%; overflow-x: hidden; }
  body { min-height: 100svh; }
  .dg-background {
    background-position: center center;
  }

  .dg-site { min-height: 100svh; }

  .dg-header {
    width: calc(100% - max(20px, env(safe-area-inset-left)) - max(20px, env(safe-area-inset-right)));
    margin-top: max(10px, env(safe-area-inset-top));
    padding: 9px 10px 9px 14px;
    gap: 10px;
    border-radius: 20px;
  }

  .dg-brand-wrap { flex: 1 1 auto; overflow: hidden; }
  .dg-brand-text { min-width: 0; }
  .dg-brand-text strong { font-size: .88rem; }
  .dg-brand-text span { font-size: .68rem; }
  .dg-logo .custom-logo { max-width: min(190px, 58vw); height: 34px; }

  .dg-menu-toggle { display: inline-flex; }

  .dg-nav {
    display: block;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    padding: 8px;
    border: 1px solid rgba(255,255,255,.20);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(39,42,46,.88), rgba(22,25,29,.82));
    box-shadow: 0 24px 60px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.16);
    backdrop-filter: blur(28px) saturate(155%);
    -webkit-backdrop-filter: blur(28px) saturate(155%);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(.985);
    transform-origin: top center;
    pointer-events: none;
    transition: opacity .18s ease, transform .22s ease, visibility .18s ease;
  }

  .dg-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
  }

  .dg-nav ul {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .dg-nav li { width: 100%; }
  .dg-nav a {
    width: 100%;
    min-height: 44px;
    justify-content: space-between;
    padding: 10px 13px;
    border-radius: 14px;
    font-size: .88rem;
  }
  .dg-nav a::after { content: "›"; font-size: 1.1rem; opacity: .55; }
  .dg-nav a:hover,
  .dg-nav .current-menu-item > a { background: rgba(255,255,255,.12); }

  .dg-main {
    width: calc(100% - max(20px, env(safe-area-inset-left)) - max(20px, env(safe-area-inset-right)));
    margin: 16px auto 28px;
    min-width: 0;
  }

  .dg-content {
    min-width: 0;
    padding: 18px;
    border-radius: 22px;
  }
  .dg-content--transparent { padding: 0; }
  .dg-entry-content,
  .dg-entry-content > * { max-width: 100%; }

  .dg-footer {
    width: calc(100% - max(20px, env(safe-area-inset-left)) - max(20px, env(safe-area-inset-right)));
    margin-bottom: max(12px, env(safe-area-inset-bottom));
    padding: 10px 12px;
    border-radius: 18px;
  }

  /* Detail Booking: prevent plugin desktop widths from forcing horizontal overflow. */
  body .dbook,
  body .dbook-calendar,
  body .dbook__layout,
  body .dbook__main,
  body .dbook__summary,
  body .dbook__panel { min-width: 0 !important; max-width: 100% !important; }

  body .dbook { width: 100% !important; }
  body .dbook__layout { grid-template-columns: minmax(0,1fr) !important; gap: 12px !important; }
  body .dbook__summary { position: static !important; width: 100% !important; }
  body .dbook__topbar { padding: 8px !important; overflow: hidden; }
  body .dbook__steps {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(4,minmax(0,1fr)) !important;
    gap: 3px !important;
  }
  body .dbook__steps button {
    min-width: 0 !important;
    justify-content: center !important;
    gap: 4px !important;
    padding: 8px 4px !important;
    white-space: nowrap;
  }
  body .dbook__steps button span { font-size: .68rem !important; overflow: hidden; text-overflow: ellipsis; }
  body .dbook__steps button b { flex: 0 0 auto; }

  body .dbook__vehicle-fields,
  body .dbook__grid2,
  body .dbook__date-time,
  body .dbook__plate-row { grid-template-columns: minmax(0,1fr) !important; }
  body .dbook__vehicle-fields > *,
  body .dbook__grid2 > *,
  body .dbook__date-time > * { min-width: 0 !important; max-width: 100% !important; }
  body .dbook input,
  body .dbook textarea,
  body .dbook select,
  body .dbook-calendar select { font-size: 16px !important; max-width: 100% !important; }
  body .dbook__service { min-width: 0 !important; }
  body .dbook__service-copy { min-width: 0 !important; }
  body .dbook__price { white-space: nowrap; }
  body .dbook__actions { gap: 8px !important; }
  body .dbook__actions button { min-height: 44px; }

  body .dbook-calendar {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  body .dbook-calendar__head { min-width: 0 !important; }
  body .dbook-calendar__weekdays,
  body .dbook-calendar__grid { min-width: 650px; }
}

@media (max-width: 520px) {
  .dg-header { padding-left: 12px; }
  .dg-menu-toggle { width: 40px; height: 40px; flex-basis: 40px; }
  .dg-footer { gap: 8px; }
  .dg-footer__copyright { line-height: 1.45; }
  .dg-footer__menu ul,
  .dg-footer__socials { gap: 3px; }
  .dg-footer__menu a,
  .dg-footer__socials a { min-height: 34px; padding: 6px 8px; }

  body .dbook__steps button { padding-inline: 2px !important; }
  body .dbook__steps button span { font-size: .62rem !important; }
  body .dbook__steps button b { width: 20px !important; height: 20px !important; font-size: .64rem !important; }
  body .dbook__main,
  body .dbook__summary { border-radius: 22px !important; }
  body .dbook__panel { padding: 18px 14px !important; }
  body .dbook__section-head { gap: 8px !important; }
  body .dbook__section-head h3 { font-size: clamp(1.55rem, 8vw, 2rem) !important; }
}


/* v0.3.2 — iPhone safe-area background fallback.
   The fixed layer is extended beyond the visual viewport by the safe-area
   insets, while the root canvas carries the same image as a Safari fallback.
   This keeps the page background static during document scrolling. */
html, body {
  min-height: 100%;
}
body {
  min-height: 100dvh;
  min-height: -webkit-fill-available;
}
.dg-site {
  min-height: 100dvh;
  min-height: -webkit-fill-available;
}
@supports (padding: max(0px)) {
  .dg-background {
    top: calc(-1 * env(safe-area-inset-top));
    right: calc(-1 * env(safe-area-inset-right));
    bottom: calc(-1 * env(safe-area-inset-bottom));
    left: calc(-1 * env(safe-area-inset-left));
  }
}
