/**
 * Hawkes' Impossible Portraits - HIP Guide (hac-hip-guide.js): gold bar, guide popovers, "Everything about
 * this page" panel. Inherits the shared --hac-* design tokens with safe fallbacks so it also reads correctly on
 * the WooCommerce cart / checkout / thank-you pages and the Gallery pages.
 *
 * Buttons use explicit resets with !important: the site/Kadence theme styles bare <button>s (the tan pill) and
 * its rules win the cascade otherwise (same reason as hac-hip-help.css).
 */

/* ---- gold bar ------------------------------------------------------------------------------------------ */
.hac-hip-guide-bar {
    position: sticky;
    top: var(--hac-guide-sticky-top, 0px);
    z-index: 50;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 0 16px;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--hac-gold, #c1a87b);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}
.hac-hip-guide-bar[hidden] { display: none !important; }

.hac-hip-guide-bar__btn {
    box-sizing: border-box !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 10px 18px !important;
    background: #1c1c1e !important;
    background-image: none !important;
    color: #f5e9cf !important;
    border: 2px solid #1c1c1e !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.35) !important;
    font: 700 1rem/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    text-shadow: none !important;
    text-decoration: none !important;
    cursor: pointer !important;
    white-space: normal !important;
    text-align: center !important;
}
.hac-hip-guide-bar__btn[hidden] { display: none !important; }
.hac-hip-guide-bar__btn:hover { background: #000 !important; border-color: #000 !important; color: #fff !important; }
.hac-hip-guide-bar__btn:focus-visible { outline: 3px solid #fff !important; outline-offset: 2px !important; }

/* The first button is the one we most want pressed. */
.hac-hip-guide-bar__show { font-size: 1.1rem !important; }

@media (max-width: 600px) {
    .hac-hip-guide-bar { gap: 8px; padding: 8px; }
    .hac-hip-guide-bar__btn { flex: 1 1 100% !important; }
}

/* ---- guide popovers (Driver.js popoverClass) ------------------------------------------------------------ */
.driver-popover.hac-hip-guide-pop {
    max-width: min(380px, calc(100vw - 32px));
    padding: 18px 18px 14px;
    border-radius: 10px;
    background: var(--hac-bg-card, #2e2d2b);
    color: var(--hac-text, #f5e9c9);
    border: 2px solid var(--hac-gold, #c1a87b);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.45);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.driver-popover.hac-hip-guide-pop .driver-popover-title {
    margin: 0 24px 6px 0;
    color: var(--hac-gold, #c1a87b);
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
}
.driver-popover.hac-hip-guide-pop .driver-popover-description {
    color: var(--hac-text, #f5e9c9);
    font-size: 1rem;
    line-height: 1.5;
}
.driver-popover.hac-hip-guide-pop .driver-popover-progress-text {
    color: var(--hac-text-muted, #c1a87b);
    font-size: 0.85rem;
}
.driver-popover.hac-hip-guide-pop .driver-popover-footer { margin-top: 14px; gap: 8px; }
.driver-popover.hac-hip-guide-pop .driver-popover-navigation-btns { gap: 8px; }

.driver-popover.hac-hip-guide-pop .driver-popover-footer button {
    box-sizing: border-box !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    min-height: 40px !important;
    margin: 0 !important;
    padding: 8px 16px !important;
    background: var(--hac-gold, #c1a87b) !important;
    background-image: none !important;
    color: #1c1c1e !important;
    border: 2px solid var(--hac-gold, #c1a87b) !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    font: 700 0.95rem/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    text-shadow: none !important;
    cursor: pointer !important;
    zoom: 1 !important;
}
.driver-popover.hac-hip-guide-pop .driver-popover-footer .driver-popover-prev-btn {
    background: transparent !important;
    color: var(--hac-gold, #c1a87b) !important;
}
.driver-popover.hac-hip-guide-pop .driver-popover-footer button:hover { filter: brightness(1.1); }
.driver-popover.hac-hip-guide-pop .driver-popover-footer button:focus-visible {
    outline: 3px solid #fff !important;
    outline-offset: 2px !important;
}
.driver-popover.hac-hip-guide-pop .driver-popover-footer .driver-popover-btn-disabled { opacity: 0.35; cursor: default !important; }

.driver-popover.hac-hip-guide-pop .driver-popover-close-btn {
    -webkit-appearance: none !important;
    appearance: none !important;
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    background: transparent !important;
    background-image: none !important;
    color: var(--hac-text, #f5e9c9) !important;
    border: 0 !important;
    box-shadow: none !important;
    font: 400 22px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    cursor: pointer !important;
}

/* Arrow colour follows the popover background. */
.driver-popover.hac-hip-guide-pop .driver-popover-arrow-side-left.driver-popover-arrow { border-left-color: var(--hac-gold, #c1a87b); }
.driver-popover.hac-hip-guide-pop .driver-popover-arrow-side-right.driver-popover-arrow { border-right-color: var(--hac-gold, #c1a87b); }
.driver-popover.hac-hip-guide-pop .driver-popover-arrow-side-top.driver-popover-arrow { border-top-color: var(--hac-gold, #c1a87b); }
.driver-popover.hac-hip-guide-pop .driver-popover-arrow-side-bottom.driver-popover-arrow { border-bottom-color: var(--hac-gold, #c1a87b); }

/* A box moved to the left edge to stay clear of tawk.to (hac-hip-guide.js keepClearOfChat): its arrow
   would point at the wrong place, so it is hidden. */
.driver-popover.hac-hip-guide-pop--left .driver-popover-arrow { display: none; }

/* Notes: same look, single "close" control. */
.driver-popover.hac-hip-guide-pop--note { border-style: dashed; }

/* ---- "Everything about this page" panel ----------------------------------------------------------------- */
.hac-hip-guide-panel {
    box-sizing: border-box;
    width: min(640px, calc(100vw - 32px));
    max-height: calc(100vh - 64px);
    overflow: auto;
    padding: 22px 22px 16px;
    border: 2px solid var(--hac-gold, #c1a87b);
    border-radius: 12px;
    background: var(--hac-bg-card, #2e2d2b);
    color: var(--hac-text, #f5e9c9);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.hac-hip-guide-panel::backdrop { background: rgba(0, 0, 0, 0.6); }
.hac-hip-guide-panel h2 {
    margin: 0 0 12px;
    color: var(--hac-gold, #c1a87b);
    font-size: 1.3rem;
    line-height: 1.3;
}
.hac-hip-guide-panel ul { margin: 0 0 16px; padding-left: 1.2em; }
.hac-hip-guide-panel li { margin: 0 0 8px; font-size: 1rem; line-height: 1.5; }
.hac-hip-guide-panel__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.hac-hip-guide-panel__actions .hac-hip-guide-bar__btn {
    background: var(--hac-gold, #c1a87b) !important;
    color: #1c1c1e !important;
    border-color: var(--hac-gold, #c1a87b) !important;
}
