/**
 * GPH Booking Widget — Stylesheet
 * v1.1.0 — X maior, botões do footer estáticos (sem hover),
 *          oculta header do site quando modal está aberto.
 */

/* ==========================================================================
   BLINDAGEM CONTRA O TEMA
   ========================================================================== */
.gph-bw-instance,
.gph-bw-instance *,
.gph-bw-instance *::before,
.gph-bw-instance *::after,
.gph-bw-overlay,
.gph-bw-overlay *,
.gph-bw-overlay *::before,
.gph-bw-overlay *::after {
    box-sizing: border-box;
}

.gph-bw-instance button,
.gph-bw-overlay button {
    all: unset;
    box-sizing: border-box;
    cursor: pointer;
    font-family: inherit;
    text-align: center;
    -webkit-appearance: none;
       -moz-appearance: none;
            appearance: none;
}
.gph-bw-instance button::-moz-focus-inner,
.gph-bw-overlay button::-moz-focus-inner {
    border: 0;
    padding: 0;
}
.gph-bw-instance button:focus-visible,
.gph-bw-overlay button:focus-visible {
    outline: 2px solid #B4DA4B;
    outline-offset: 2px;
}

.gph-bw-instance svg,
.gph-bw-overlay svg {
    display: inline-block;
    width: auto;
    height: auto;
    max-width: 100%;
    vertical-align: middle;
    flex-shrink: 0;
}

.gph-bw-instance button::before,
.gph-bw-instance button::after,
.gph-bw-overlay button::before,
.gph-bw-overlay button::after {
    content: none !important;
    display: none !important;
}

/* ---------- Design tokens ---------- */
.gph-bw-instance {
    --gph-green-dark:  #173028;
    --gph-green-black: #003501;
    --gph-green-lime:  #B4DA4B;
    --gph-brown-dark:  #272A1B;
    --gph-brown-deep:  #2E1C0E;
    --gph-beige:       #EFE9DD;
    --gph-cream:       #FDFAF4;
    --gph-white:       #FFFFFF;
    --gph-black:       #000000;
    --gph-muted:       #8a8775;
    --gph-border:      rgba(39, 42, 27, 0.2);
    --gph-radius-pill: 9999px;
    --gph-radius-md:   12px;
    --gph-radius-lg:   24px;
    --gph-font-heading: 'Raleway', system-ui, -apple-system, sans-serif;
    --gph-font-ui:      'Inter', system-ui, -apple-system, sans-serif;
    --gph-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

.gph-bw-instance,
.gph-bw-instance * {
    font-family: var(--gph-font-ui);
}

/* ==========================================================================
   WRAPPER DO TRIGGER — CENTRALIZADO
   ========================================================================== */
.gph-bw-instance {
    display: block;
    width: 100%;
    text-align: center;
}

/* ==========================================================================
   BOTÃO DE ABERTURA (CTA)
   ========================================================================== */
.gph-bw-instance .gph-bw-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 32px;
    background: #FFFFFF;
    color: #272A1B;
    border: 0.3px solid #272A1B;
    border-radius: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color .25s var(--gph-ease, ease),
                color .25s var(--gph-ease, ease),
                border-color .25s var(--gph-ease, ease);
    line-height: 1;
    width: auto;
    max-width: none;
    min-width: 0;
    height: auto;
    margin: 0 auto;
    text-decoration: none;
    box-shadow: none;
}
.gph-bw-instance .gph-bw-trigger:hover {
    background: #B4DA4B;
    color: #272A1B;
    border-color: #272A1B;
}
.gph-bw-instance .gph-bw-trigger:active {
    background: #B4DA4B;
    color: #272A1B;
}
.gph-bw-instance .gph-bw-trigger svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
    display: inline-block;
}
.gph-bw-instance .gph-bw-trigger span {
    display: inline-block;
    line-height: 1;
}

/* ==========================================================================
   ESCONDER HEADER DO SITE / ASKSUITE ENQUANTO MODAL ESTÁ ABERTO
   Requer que o JS adicione a classe "gph-bw-modal-open" no <body>
   ao abrir, e remova ao fechar.
   ========================================================================== */
body.gph-bw-modal-open header,
body.gph-bw-modal-open .site-header,
body.gph-bw-modal-open #site-header,
body.gph-bw-modal-open .elementor-location-header,
body.gph-bw-modal-open .elementor-section[data-elementor-type="header"],
body.gph-bw-modal-open [data-elementor-type="header"],
body.gph-bw-modal-open .ehf-header,
body.gph-bw-modal-open .ast-header-break-point,
body.gph-bw-modal-open #masthead,
body.gph-bw-modal-open .main-header,
body.gph-bw-modal-open nav.main-navigation,
body.gph-bw-modal-open .asksuite-launcher,
body.gph-bw-modal-open #asksuite-launcher,
body.gph-bw-modal-open [class*="asksuite"],
body.gph-bw-modal-open [id*="asksuite"],
body.gph-bw-modal-open iframe[src*="asksuite"] {
    visibility: hidden !important;
    pointer-events: none !important;
    z-index: 0 !important;
}

/* Trava o scroll do body quando modal aberto */
body.gph-bw-modal-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
}

/* ==========================================================================
   OVERLAY + MODAL — Z-INDEX MÁXIMO ABSOLUTO
   ========================================================================== */
.gph-bw-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(39, 42, 27, 0.65);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2147483647 !important;
    isolation: isolate;
    padding: 20px;
    overflow: hidden;
    animation: gphBwFade .2s ease;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    pointer-events: auto;
}
.gph-bw-overlay[hidden] { display: none !important; }
.gph-bw-overlay.is-open { display: flex !important; }

@keyframes gphBwFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.gph-bw-modal {
    background: #FDFAF4;
    width: 100%;
    max-width: 540px;
    border-radius: 12px;
    color: #272A1B;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
    animation: gphBwSlide .3s ease;
    max-height: calc(100vh - 40px);
    height: auto;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}
@keyframes gphBwSlide {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

/* ==========================================================================
   HEADER DO MODAL — X grande no canto direito
   ========================================================================== */
.gph-bw-header {
    background: #EFE9DD;
    padding: 12px 64px 12px 16px;
    position: relative;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(39, 42, 27, 0.12);
    min-height: 0;
    display: block;
    text-align: center;
}

/* X bem maior — 42px de área de toque */
.gph-bw-close {
    position: absolute !important;
    top: 50% !important;
    right: 12px !important;
    left: auto !important;
    transform: translateY(-50%) !important;
    width: 42px !important;
    height: 42px !important;
    min-width: 42px;
    min-height: 42px;
    background: rgba(39, 42, 27, 0.08);
    border: none;
    border-radius: 50%;
    color: #272A1B;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: background-color .2s var(--gph-ease, ease);
    padding: 0;
    margin: 0;
    flex: 0 0 auto;
}
.gph-bw-close:hover {
    background: rgba(39, 42, 27, 0.18);
}
.gph-bw-close svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    fill: none;
    display: inline-block;
}

/* Stepper compacto */
.gph-bw-stepper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    max-width: 280px;
    margin: 0 auto;
    vertical-align: middle;
}
.gph-bw-step {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(39, 42, 27, 0.08);
    padding: 4px 12px;
    border-radius: 9999px;
    color: rgba(39, 42, 27, 0.55);
    font-weight: 600;
    font-size: 12px;
    line-height: 1;
    transition: all .25s var(--gph-ease, ease);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}
.gph-bw-step.is-done,
.gph-bw-step.is-active {
    background: #272A1B;
    color: #FDFAF4;
}
.gph-bw-step.is-pending {
    background: transparent;
    border: 1px dashed rgba(39, 42, 27, 0.4);
    padding: 3px 11px;
    color: rgba(39, 42, 27, 0.5);
}
.gph-bw-step-num { font-variant-numeric: tabular-nums; }
.gph-bw-step-icon {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #272A1B;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #FDFAF4;
}
.gph-bw-step.is-active .gph-bw-step-icon,
.gph-bw-step.is-done .gph-bw-step-icon {
    background: #FDFAF4;
    color: #272A1B;
}
.gph-bw-step-icon svg {
    width: 9px;
    height: 9px;
    stroke: currentColor;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    display: inline-block;
}
.gph-bw-step.is-pending .gph-bw-step-icon {
    background: transparent;
    border: 1px dashed rgba(39, 42, 27, 0.4);
    color: rgba(39, 42, 27, 0.4);
}
.gph-bw-stepper-line {
    flex: 0 0 24px;
    border-top: 1px dashed rgba(39, 42, 27, 0.35);
}

/* ==========================================================================
   BODY
   ========================================================================== */
.gph-bw-body {
    padding: 20px 22px;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1 1 auto;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
}
.gph-bw-panel { display: none; }
.gph-bw-panel.is-active { display: block; animation: gphBwFade .25s ease; }

.gph-bw-title {
    font-family: 'Raleway', system-ui, -apple-system, sans-serif;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0;
    margin: 0 0 8px;
    color: #272A1B;
    line-height: 1.25;
    text-transform: uppercase;
}
.gph-bw-text {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 13px;
    color: #272A1B;
    line-height: 1.55;
    margin: 0 0 18px;
    opacity: 0.85;
}
.gph-bw-text + .gph-bw-text {
    margin-top: -10px;
}
.gph-bw-text small {
    color: #8a8775;
    font-size: 11px;
    display: block;
    margin-top: 6px;
}

/* ==========================================================================
   CALENDÁRIO
   ========================================================================== */
.gph-bw-cal {
    border: 1px solid rgba(39, 42, 27, 0.15);
    border-radius: 8px;
    padding: 12px 12px 14px;
    background: #FFFFFF;
    width: 100%;
    overflow: hidden;
    margin-top: 8px;
}
.gph-bw-cal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    gap: 8px;
}
.gph-bw-cal-nav {
    background: #272A1B;
    color: #FDFAF4;
    border: none;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
    transition: opacity .2s var(--gph-ease, ease);
}
.gph-bw-cal-nav:hover:not(:disabled) {
    background: #272A1B;
    color: #FDFAF4;
    opacity: 0.85;
}
.gph-bw-cal-nav:disabled { opacity: .25; cursor: not-allowed; }
.gph-bw-cal-nav svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    stroke-width: 2.5;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    display: inline-block;
}
.gph-bw-cal-month {
    font-family: 'Raleway', system-ui, -apple-system, sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #272A1B;
    text-align: center;
    flex: 1;
}
.gph-bw-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 2px;
    border-top: 1px solid rgba(39, 42, 27, 0.12);
    padding-top: 8px;
    width: 100%;
}
.gph-bw-cal-dow {
    text-align: center;
    font-size: 10px;
    font-weight: 700;
    color: #8a8775;
    padding: 4px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    min-width: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}
.gph-bw-cal-day {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    color: #272A1B;
    border: none;
    background: transparent;
    transition: background-color .15s var(--gph-ease, ease),
                color .15s var(--gph-ease, ease);
    padding: 0;
    width: 100%;
    min-width: 0;
    max-width: none;
    margin: 0;
    box-shadow: none;
    text-decoration: none;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}
.gph-bw-cal-day:hover:not(:disabled):not(.is-checkin):not(.is-checkout) {
    background: #EFE9DD;
}
.gph-bw-cal-day:disabled {
    color: rgba(0, 0, 0, 0.2);
    cursor: not-allowed;
}
.gph-bw-cal-day.is-empty { visibility: hidden; pointer-events: none; }
.gph-bw-cal-day.is-checkin,
.gph-bw-cal-day.is-checkout {
    background: #272A1B;
    color: #FDFAF4;
    font-weight: 700;
}
.gph-bw-cal-day.is-between {
    background: #B4DA4B;
    color: #272A1B;
    border-radius: 4px;
}

/* ==========================================================================
   CONTADORES DE HÓSPEDES (+/−)
   ========================================================================== */
.gph-bw-counter {
    border: 1px solid rgba(39, 42, 27, 0.15);
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    margin-bottom: 12px;
    background: #FFFFFF;
}
.gph-bw-counter-label {
    font-size: 13px;
    color: #272A1B;
    margin-bottom: 10px;
    font-weight: 500;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}
.gph-bw-counter-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
}
.gph-bw-counter-btn {
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    border: 1px solid #272A1B;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    font-weight: 400;
    color: #272A1B;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color .2s var(--gph-ease, ease),
                color .2s var(--gph-ease, ease);
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}
.gph-bw-counter-btn:hover:not(:disabled) {
    background: #272A1B;
    color: #FDFAF4;
}
.gph-bw-counter-btn:disabled {
    opacity: .3;
    cursor: not-allowed;
}
.gph-bw-counter-value {
    font-size: 20px;
    font-weight: 500;
    min-width: 28px;
    color: #272A1B;
    font-variant-numeric: tabular-nums;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.gph-bw-child-ages {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
    justify-content: center;
}
.gph-bw-child-ages:empty { display: none; }
.gph-bw-child-age {
    background: #EFE9DD;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 11px;
    color: #272A1B;
    text-align: center;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color .2s var(--gph-ease, ease);
}
.gph-bw-child-age:hover {
    background: #e3dccc;
}
.gph-bw-child-age select {
    display: block;
    margin-top: 4px;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    color: #272A1B;
    text-align: center;
    cursor: pointer;
    outline: none;
}

/* ==========================================================================
   RECAP
   ========================================================================== */
.gph-bw-recap {
    margin-top: 14px;
    padding: 12px 14px;
    background: #EFE9DD;
    border-radius: 8px;
    font-size: 12px;
    color: #272A1B;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}
.gph-bw-recap:empty { display: none; }
.gph-bw-recap svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    display: inline-block;
}
.gph-bw-recap strong { font-weight: 700; }

/* ==========================================================================
   FOOTER — botões 100% ESTÁTICOS (sem hover/active/focus visual)
   ========================================================================== */
.gph-bw-footer {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 10px;
    padding: 12px 16px 14px;
    border-top: 1px solid rgba(39, 42, 27, 0.12);
    background: #FDFAF4;
    flex-shrink: 0;
    flex-grow: 0;
}

/* Botão padrão — só texto, sem feedback de hover/click */
.gph-bw-btn,
.gph-bw-btn-primary,
.gph-bw-btn-secondary {
    flex: 1 1 auto;
    padding: 12px 16px;
    border-radius: 0 !important;
    font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
    cursor: pointer;
    border: 0.3px solid #272A1B !important;
    background: #FFFFFF !important;
    color: #272A1B !important;
    transition: none !important;
    line-height: 1.1 !important;
    box-shadow: none !important;
    text-decoration: none !important;
    min-height: 42px;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    white-space: nowrap !important;
    transform: none !important;
    outline: none !important;
}

/* TRAVA TODOS os estados (hover, active, focus, focus-visible) para idênticos ao normal */
.gph-bw-btn:hover,
.gph-bw-btn:active,
.gph-bw-btn:focus,
.gph-bw-btn:focus-visible,
.gph-bw-btn-primary:hover,
.gph-bw-btn-primary:active,
.gph-bw-btn-primary:focus,
.gph-bw-btn-primary:focus-visible,
.gph-bw-btn-secondary:hover,
.gph-bw-btn-secondary:active,
.gph-bw-btn-secondary:focus,
.gph-bw-btn-secondary:focus-visible {
    background: #FFFFFF !important;
    color: #272A1B !important;
    border-color: #272A1B !important;
    transform: none !important;
    box-shadow: none !important;
    outline: none !important;
    opacity: 1 !important;
}

.gph-bw-btn-secondary {
    flex: 0 0 auto;
    padding: 12px 18px;
    min-width: 90px;
}
.gph-bw-btn-secondary[hidden] { display: none !important; }

.gph-bw-btn-primary {
    flex: 1 1 auto;
}
.gph-bw-btn-primary:disabled,
.gph-bw-btn-primary[disabled] {
    background: rgba(39, 42, 27, 0.04) !important;
    color: rgba(39, 42, 27, 0.35) !important;
    border-color: rgba(39, 42, 27, 0.18) !important;
    cursor: not-allowed !important;
}

/* ==========================================================================
   MOBILE
   ========================================================================== */
@media (max-width: 540px) {
    .gph-bw-overlay {
        padding: 0;
        align-items: stretch;
    }
    .gph-bw-modal {
        border-radius: 0;
        max-height: 100vh;
        max-height: 100dvh;
        min-height: 100vh;
        min-height: 100dvh;
        height: 100vh;
        height: 100dvh;
        width: 100%;
        max-width: 100%;
    }
    .gph-bw-title { font-size: 16px; margin-bottom: 6px; }
    .gph-bw-text { margin-bottom: 14px; font-size: 12.5px; }
    .gph-bw-header { padding: 10px 56px 10px 14px; }
    .gph-bw-body { padding: 18px 14px; }
    .gph-bw-footer {
        padding: 10px 12px 14px;
        gap: 8px;
    }
    .gph-bw-stepper-line { flex-basis: 18px; }
    .gph-bw-cal { padding: 10px; margin-top: 6px; }
    .gph-bw-cal-day { font-size: 12px; }
    .gph-bw-cal-dow { font-size: 9px; letter-spacing: 0.5px; }
    .gph-bw-btn,
    .gph-bw-btn-primary,
    .gph-bw-btn-secondary {
        font-size: 11px !important;
        letter-spacing: 0.5px !important;
        padding: 11px 10px;
        min-height: 40px;
    }
    .gph-bw-btn-secondary {
        padding: 11px 14px;
        min-width: 80px;
    }
    .gph-bw-close {
        width: 40px !important;
        height: 40px !important;
        right: 10px !important;
    }
    .gph-bw-close svg {
        width: 17px;
        height: 17px;
    }
    .gph-bw-instance .gph-bw-trigger {
        padding: 12px 24px;
        font-size: 13px;
        letter-spacing: 1px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gph-bw-overlay,
    .gph-bw-modal,
    .gph-bw-panel {
        animation: none;
    }
    .gph-bw-instance .gph-bw-trigger,
    .gph-bw-cal-nav,
    .gph-bw-cal-day,
    .gph-bw-counter-btn,
    .gph-bw-close {
        transition: none;
    }
}