/* =========================================================
   Il Dentista Gentile — WordPress layer
   Elementor wrappers, ElementsKit header/footer, admin bar, cookie banner,
   consent-gated map, Google reviews (Trustindex), form states, editor helpers.
   ========================================================= */

/* ---------- Elementor: every section widget is full bleed, no spacing added by Elementor ---------- */
.elementor-section.dg-wrap > .elementor-container { max-width: none; }
.elementor-section.dg-wrap > .elementor-container > .elementor-column > .elementor-widget-wrap { padding: 0 !important; }
.dg-wrap .elementor-widget, .dg-wrap .elementor-element { --kit-widget-spacing: 0; margin-block-end: 0; }
.dg-wrap .elementor-widget:not(:last-child) { margin-bottom: 0; }
.e-con.dg-wrap { --padding-top: 0; --padding-bottom: 0; --padding-left: 0; --padding-right: 0; --gap: 0; --width: 100%; }
.elementor .dg-sec img { border-radius: inherit; }
.site-main { display: block; }
body.page-template-elementor_header_footer, body { background: var(--ink); }

/* journey: number of steps from the widget */
.journey { grid-template-columns: repeat(var(--n, 3), 1fr); }
@media (max-width: 900px) { .journey { grid-template-columns: 1fr; } }

/* ---------- header (ElementsKit template or built-in) ---------- */
.dg-ekit-header .elementor-section, .dg-ekit-header .e-con { position: static; }
.dg-ekit-header .elementor-widget-wrap, .dg-ekit-header .e-con-inner, .dg-ekit-header .elementor-container { padding: 0 !important; }
.admin-bar .hdr { top: 46px; }
.admin-bar .hdr.is-scrolled { top: 42px; }
@media (max-width: 782px) { .admin-bar .hdr, .admin-bar .hdr.is-scrolled { top: 56px; } }
@media (max-width: 600px) { #wpadminbar { position: fixed; } }
.dg-ekit-header--edit { padding: 30px 0 40px; min-height: 150px; background: var(--ink); }
.dg-ekit-header--edit .hdr { position: relative; top: 0; left: auto; transform: none; margin: 0 auto; }
.dg-ekit-header--edit .dg-menu { display: none; }
.dg-editor .hdr { position: relative; top: 0; left: auto; transform: none; margin: 14px auto; }

/* ---------- footer (ElementsKit template) ---------- */
.ftr--ekit .elementor-section.dg-f-top > .elementor-container,
.ftr--ekit .elementor-section.dg-f-bottom > .elementor-container { max-width: min(var(--maxw), 100% - 2 * var(--gutter) + 20px); }
.ftr--ekit .elementor-widget-container { color: inherit; }
.ftr--ekit .elementor-column > .elementor-widget-wrap { padding-top: 0 !important; padding-bottom: 0 !important; }
.ftr-col h3, .ftr-col h4 { margin: 4px 0 16px; }
.ftr-loc address a { color: rgba(255, 255, 255, .78); }
.ftr-loc address a:hover { color: var(--aqua); }
.ftr-social { display: flex; gap: 10px; margin-top: 18px; }
.ftr-social a { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-d); color: #fff; transition: .3s; }
.ftr-social a:hover { background: var(--aqua); color: var(--ink); border-color: var(--aqua); }
.ftr-social svg { width: 18px; height: 18px; }
@media (max-width: 1024px) { .ftr--ekit .elementor-section.dg-f-top .elementor-column { width: 50% !important; margin-bottom: 34px; } }
@media (max-width: 767px) { .ftr--ekit .elementor-section.dg-f-top .elementor-column { width: 100% !important; } }

/* ---------- editor-only notes (never shown to visitors) ---------- */
body:not(.logged-in) .ph-tag, body:not(.logged-in) .ph, body:not(.logged-in) .dg-only-editors { display: none !important; }
.ph-tag { position: absolute; z-index: 5; top: 14px; right: 14px; padding: 6px 10px; border-radius: 999px; background: rgba(255, 196, 0, .95); color: #3b2c00; font: 800 .6rem/1 var(--f-body); letter-spacing: .1em; text-transform: uppercase; pointer-events: none; }
.sg .ph-tag, .ab-hero .ph-tag { top: calc(var(--hdr-h) + 34px); }
.tm .ph-tag { left: 14px; right: auto; }

/* ---------- Elementor editor: everything visible, no intro/fixed chrome ---------- */
.dg-editor .intro, .dg-editor .curtain, .dg-editor .cursor, .dg-editor .mbar, .dg-editor .dg-cookie { display: none !important; }
.dg-editor .tech-pin { height: 720px; }

/* ---------- cookie banner ---------- */
.dg-cookie { position: fixed; z-index: 130; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); width: min(360px, calc(100% - 32px)); padding: 16px 16px 14px; border-radius: 20px; background: rgba(7, 22, 27, .94); color: #fff; border: 1px solid rgba(255, 255, 255, .12); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6); animation: ckIn .7s var(--ease); }
.dg-cookie[hidden] { display: none; }
@keyframes ckIn { from { transform: translateY(20px); opacity: 0; } }
.dg-cookie h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-family: var(--f-head); font-variation-settings: "SOFT" 100; font-weight: 560; font-size: 1rem; }
.dg-cookie h4 svg { width: 18px; height: 18px; color: var(--aqua); }
.dg-cookie p { margin: 0 0 12px; font-size: .78rem; line-height: 1.5; color: var(--muted-d); }
.dg-cookie p a { color: var(--aqua); text-decoration: underline; }
.dg-cookie-row { display: flex; gap: 8px; }
.dg-cookie-row button { flex: 1; height: 38px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .22); font: 800 .64rem/1 var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: #fff; transition: .3s; }
.dg-cookie-row button:hover { border-color: #fff; }
.dg-cookie-row button.primary { background: var(--aqua); border-color: var(--aqua); color: var(--ink); }
@media (max-width: 900px) { .dg-cookie { bottom: calc(84px + env(safe-area-inset-bottom)); right: 10px; width: calc(100% - 20px); } .dg-cookie p { font-size: .74rem; } }

/* ---------- map: Google iframe only after consent ---------- */
.map-consent { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; padding: 30px; text-align: center; background: radial-gradient(circle at 50% 40%, #fff, var(--sand)); color: var(--text); z-index: 1; }
.map-consent > svg { width: 44px; height: 44px; color: var(--aqua-ink); }
.map-consent p { margin: 0; max-width: 34ch; color: var(--muted); font-size: .92rem; }
.map.is-on .map-consent { display: none; }
.map-badge { z-index: 2; }

/* ---------- forms: sending / server error ---------- */
.form.sending { opacity: .7; pointer-events: none; }
.form-err { margin: 0; padding: 12px 16px; border-radius: 14px; background: rgba(255, 74, 94, .12); border: 1px solid rgba(255, 74, 94, .35); color: #ffd3d8; font-size: .88rem; line-height: 1.5; }
.form-err[hidden] { display: none; }
.form.sent > .form-err { display: none; }

/* ---------- Google reviews (section + Trustindex brand overrides) ---------- */
.rv-head { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(30px, 5vw, 80px); align-items: end; margin-bottom: clamp(40px, 5vw, 64px); }
.rv-head .h-lg { max-width: 14ch; }
.rv-side .lead { margin: 0 0 24px; }
.rv-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.rv-badge { display: inline-flex; align-items: center; gap: 12px; padding: 10px 18px 10px 10px; border-radius: 20px; background: #fff; border: 1px solid var(--line); box-shadow: 0 16px 40px -28px rgba(7, 22, 27, .5); }
.rv-badge .g { width: 42px; height: 42px; border-radius: 13px; background: var(--pearl); display: grid; place-items: center; }
.rv-badge .g svg { width: 22px; height: 22px; }
.rv-badge b { display: block; font-family: var(--f-head); font-variation-settings: "SOFT" 100; font-weight: 600; font-size: 1rem; }
.rv-badge small { display: flex; align-items: center; gap: 8px; font-size: .78rem; color: var(--muted); }
.rv-stars { display: inline-flex; gap: 2px; color: #f5b301; }
.rv-stars svg { width: 12px; height: 12px; }
.is-deep .rv-badge { background: rgba(255, 255, 255, .06); border-color: var(--line-d); }
.is-deep .rv-badge .g { background: #fff; }
.is-deep .rv-badge small { color: var(--muted-d); }
.rv-slot { position: relative; border-radius: var(--r); background: #fff; border: 1px solid var(--line); padding: clamp(18px, 3vw, 34px); box-shadow: 0 40px 80px -60px rgba(7, 22, 27, .45); }
.is-deep .rv-slot { background: rgba(255, 255, 255, .04); border-color: var(--line-d); }
.rv-slot .sk { display: block; height: 10px; border-radius: 6px; margin-bottom: 9px; background: linear-gradient(90deg, var(--sand) 0%, #f3f7f5 50%, var(--sand) 100%); background-size: 200% 100%; animation: shimmer 1.8s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.rvs-summary { display: flex; align-items: center; gap: 16px; padding: 0 4px 20px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.rvs-glogo { width: 36px; height: 36px; flex: none; }
.rvs-sum-txt { display: grid; gap: 6px; }
.rvs-stars { display: flex; gap: 3px; margin: 2px 0 12px; color: #f5b301; }
.rvs-stars svg { width: 14px; height: 14px; }
.rvs-stars.big svg { width: 18px; height: 18px; }
.rvs-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.rvs-card { border: 1px solid var(--line); border-radius: 20px; padding: 18px; background: var(--pearl); }
.rvs-top { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.rvs-av { width: 38px; height: 38px; border-radius: 50%; flex: none; background: linear-gradient(135deg, var(--aqua-2), var(--aqua)); }
.rvs-who { flex: 1; display: grid; }
.rvs-g { width: 18px; height: 18px; flex: none; }
.rv-note { display: flex; gap: 10px; align-items: flex-start; margin: 20px 0 0; padding: 12px 16px; border-radius: 14px; background: #fdf3e3; color: #7a541a; font-size: .84rem; line-height: 1.5; }
.rv-note svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.rv-note code { background: rgba(0, 0, 0, .06); padding: 2px 6px; border-radius: 6px; }
@media (max-width: 960px) { .rv-head { grid-template-columns: 1fr; } .rvs-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .rvs-row { grid-template-columns: 1fr; } .rvs-card:nth-child(n+2) { display: none; } }
/* Trustindex widget (class names can change between plugin versions: verify in the inspector after install) */
.rv-slot .ti-widget { font-family: var(--f-body) !important; color: var(--text) !important; }
.rv-slot .ti-widget .ti-review-item > .ti-inner, .rv-slot .ti-widget .ti-review-item .ti-inner { background: var(--pearl) !important; border: 1px solid var(--line) !important; border-radius: 20px !important; box-shadow: none !important; }
.rv-slot .ti-widget .ti-name, .rv-slot .ti-widget .ti-rating-text, .rv-slot .ti-widget .ti-header .ti-rating { font-family: var(--f-head) !important; color: var(--ink) !important; }
.rv-slot .ti-widget .ti-review-content, .rv-slot .ti-widget .ti-review-text-container { color: var(--text) !important; font-size: 15px !important; line-height: 1.6 !important; }
.rv-slot .ti-widget .ti-read-more, .rv-slot .ti-widget a { color: var(--aqua-ink) !important; }
.rv-slot .ti-widget .ti-controls .ti-next, .rv-slot .ti-widget .ti-controls .ti-prev { border-radius: 50% !important; }
.rv-slot:has(.ti-widget) .rv-note { display: none; }

/* ---------- contact: emergency channel ---------- */
.ch-ic--sos { color: var(--sos); }

/* ---------- simple pages (legal, posts, 404) ---------- */
.legal { padding-bottom: 60px; }
.legal-inner .h-lg { max-width: 16ch; }
.legal-body { max-width: 820px; font-size: 1.02rem; line-height: 1.75; color: var(--text); }
.legal-body h2, .legal-body h3 { font-family: var(--f-head); font-variation-settings: "SOFT" 100; font-weight: 560; letter-spacing: -.01em; margin: 1.6em 0 .5em; }
.legal-body a { color: var(--aqua-ink); text-decoration: underline; }
.legal-body ul, .legal-body ol { padding-left: 22px; margin: 0 0 18px; }
.dg-post { padding: 26px 0; border-bottom: 1px solid var(--line); }
.dg-post h2 { font-family: var(--f-head); font-size: 1.6rem; margin: 0 0 8px; }

/* WordPress core helpers */
.screen-reader-text { border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important; }
.alignleft { float: left; margin: 0 24px 16px 0; } .alignright { float: right; margin: 0 0 16px 24px; } .aligncenter { display: block; margin: 0 auto; }
.wp-caption-text { font-size: .86rem; color: var(--muted); }
