/**
 * Slide Panel (Pro-only). Two independent concerns:
 *
 * 1. Layout: a flex row placing the existing .granpai-globe-wrapper next
 *    to a new slide panel column (js/pro-slider.js moves the wrapper into
 *    this container at runtime - the free plugin's own PHP output is
 *    never touched). Below ~780px the panel is removed entirely (not
 *    stacked) and the free plugin's own on-demand modal is the sole
 *    mobile experience - a deliberate choice, since a full slide's worth
 *    of text stacked above/below a map reads as much heavier on a phone
 *    than Pin List Sidebar's compact accordion rows do.
 *
 * 2. The slide/nav components themselves - eyebrow, headline,
 *    description, Get Directions button, arrows, bullets. Transparent
 *    background throughout (this panel is meant to sit directly on
 *    whatever the page itself puts behind it, not a boxed panel), with
 *    a light/dark text color choice independent of the globe/map's own
 *    theme.
 *
 * This file's selectors never touch .granpai-globe-wrapper's own
 * internals - it only lays out AROUND it and styles the new panel.
 */

/* ----------------------------------------------------------------------
 * The docked/floating modal (free plugin) is replaced by the slide
 * panel in this mode - hidden entirely rather than left to coexist,
 * since its content is now shown directly on the active slide instead.
 * The free plugin's modal JS keeps running underneath exactly as it
 * always does (it has no idea this mode exists) - only its visual
 * presentation is suppressed here.
 *
 * Scoped to above the panel's own 780px mobile breakpoint - below that,
 * the panel is removed entirely (see the @media block further down) and
 * the modal is restored there instead of staying suppressed.
 * ------------------------------------------------------------------- */
@media screen and (min-width: 781px) {
    .granpai-globe-wrapper[data-slide-panel="left"] .granpai-modal-overlay,
    .granpai-globe-wrapper[data-slide-panel="right"] .granpai-modal-overlay {
        display: none !important;
    }
}

.granpai-slide-layout {
    display: flex;
    align-items: center;
    gap: 28px;
    width: 100%;
}

/* Default (no explicit side, shouldn't normally happen since the PHP
   side only ever sets data-slide-side to 'left' or 'right') falls back
   to the same row order as 'right'. */
.granpai-slide-layout,
.granpai-slide-layout[data-slide-side="right"] {
    flex-direction: row;
}
.granpai-slide-layout[data-slide-side="left"] {
    /* Panel is always the 2nd DOM child (see pro-slider.js) - reversing
       the row visually puts it on the left without touching DOM order,
       matching pro-sidebar.css's identical trick for the same reason. */
    flex-direction: row-reverse;
}

.granpai-slide-layout > .granpai-globe-wrapper {
    /* Same 60/40-ish split and flex-basis:0 reasoning as
       .granpai-pls-layout > .granpai-globe-wrapper in pro-sidebar.css. */
    flex: 3 1 0;
    min-width: 0;
}

.granpai-slide-panel {
    flex: 2 1 0;
    min-width: 280px;
    max-width: 520px;
    background: transparent;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.granpai-slide-track {
    position: relative;
    min-height: 180px;
}

.granpai-slide {
    display: none;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}
.granpai-slide.is-active {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.granpai-slide-eyebrow {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.7;
    color: inherit;
}

.granpai-slide-headline {
    margin: 0;
    font-size: clamp(22px, 3vw, 34px);
    font-weight: 700;
    line-height: 1.15;
    color: inherit;
}

.granpai-slide-description {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    opacity: 0.85;
    max-width: 46ch;
    color: inherit;
}

.granpai-slide-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    margin-top: 6px;
    padding: 11px 20px;
    border-radius: 999px;
    background: var(--gp-pin-color, #00ffcc);
    color: #05070a;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.granpai-slide-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}
.granpai-slide-button svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* ---------- Light/dark text (independent of the globe/map's own theme) --- */
.granpai-slide-panel[data-slide-text="dark"] {
    color: #14151f;
}
.granpai-slide-panel[data-slide-text="light"] {
    color: #ffffff;
}

/* ---------- Nav: arrows + bullets ---------- */
.granpai-slide-nav {
    display: flex;
    align-items: center;
    gap: 14px;
}
.granpai-slide-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid currentColor;
    border-radius: 50%;
    background: transparent;
    color: inherit;
    opacity: 0.7;
    cursor: pointer;
    transition: opacity 0.18s ease, background 0.18s ease;
}
.granpai-slide-arrow:hover {
    opacity: 1;
    background: rgba(128, 128, 128, 0.12);
}
.granpai-slide-arrow svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}
.granpai-slide-bullets {
    display: flex;
    align-items: center;
    gap: 8px;
}
.granpai-slide-bullet {
    width: 8px;
    height: 8px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: currentColor;
    color: inherit;
    opacity: 0.35;
    cursor: pointer;
    transition: opacity 0.18s ease, transform 0.18s ease;
}
.granpai-slide-bullet:hover {
    opacity: 0.6;
}
.granpai-slide-bullet.is-active {
    opacity: 1;
    transform: scale(1.3);
}

@media screen and (max-width: 780px) {
    .granpai-slide-layout,
    .granpai-slide-layout[data-slide-side="left"],
    .granpai-slide-layout[data-slide-side="right"] {
        flex-direction: row; /* irrelevant once the panel is removed below, but keeps the wrapper's own box model unaffected */
    }
    .granpai-slide-layout > .granpai-globe-wrapper {
        flex: 1 1 auto;
        width: 100%;
    }
    /* Removed entirely (not stacked) - the free plugin's own modal
       (restored above, at this same breakpoint) is the sole mobile
       experience for this feature. */
    .granpai-slide-panel {
        display: none;
    }
}
