/**
 * PickleHub Base Theme - Reusable UI components.
 */

.ph-container {
    width: var(--ph-container);
    margin-left: auto;
    margin-right: auto;
}

.ph-wide {
    width: var(--ph-wide);
    margin-left: auto;
    margin-right: auto;
}

.ph-glass,
.wp-block-group.ph-glass {
    background: var(--ph-surface);
    border: 1px solid var(--ph-border);
    border-radius: var(--ph-radius-xl);
    box-shadow: var(--ph-shadow-card);
    backdrop-filter: var(--ph-glass-blur);
    -webkit-backdrop-filter: var(--ph-glass-blur);
}

.ph-card {
    background: var(--ph-surface-strong);
    border: 1px solid var(--ph-border);
    border-radius: var(--ph-radius-lg);
    box-shadow: var(--ph-shadow-card);
    padding: clamp(1rem, 2vw, 1.5rem);
}

.ph-card:hover {
    box-shadow: var(--ph-shadow-lift);
}

.ph-btn,
.wp-block-button__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 44px;
    padding: 0.75rem 1.15rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 800;
    text-decoration: none;
    line-height: 1;
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, color 160ms ease;
}

.ph-btn:hover,
.wp-block-button__link:hover {
    transform: translateY(-1px);
}

.ph-btn-primary {
    background: var(--ph-primary);
    color: #ffffff;
    box-shadow: 0 14px 30px rgba(11, 95, 122, 0.22);
}

.ph-btn-primary:hover,
.ph-btn-primary:focus {
    background: var(--ph-primary-dark);
    color: #ffffff;
}

.ph-btn-soft {
    background: var(--ph-primary-soft);
    color: var(--ph-primary-dark);
    border-color: var(--ph-border);
}

.ph-btn-soft:hover,
.ph-btn-soft:focus {
    background: #ffffff;
    color: var(--ph-primary-dark);
}

.ph-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: var(--ph-accent-soft);
    color: var(--ph-primary-dark);
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0.02em;
}

.ph-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(244, 249, 252, 0.78);
    border-bottom: 1px solid var(--ph-border);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.ph-header-inner {
    width: var(--ph-wide);
    margin: 0 auto;
    padding: 0.9rem 0;
}

.ph-footer {
    margin-top: 4rem;
    padding: 2.5rem 0;
    background: var(--ph-primary-dark);
    color: rgba(255, 255, 255, 0.82);
}

.ph-footer a {
    color: #ffffff;
}

.ph-grid {
    display: grid;
    gap: 1rem;
}

.ph-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 860px) {
    .ph-grid-3 {
        grid-template-columns: 1fr;
    }

    .ph-header-inner {
        width: min(100% - 24px, 1180px);
    }
}



/**
 * PickleHub Base Theme - Header/Footer Layout System v1.1.0.
 */

.ph-header,
.ph-header-centered,
.ph-header-booking-cta,
.ph-header-owner-aware {
    position: sticky;
    top: var(--wp-admin--admin-bar--height, 0);
    z-index: 50;
    background: rgba(244, 249, 252, 0.84);
    border-bottom: 1px solid var(--ph-border);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.ph-header.is-style-picklehub-glass-header,
.ph-header-centered.is-style-picklehub-glass-header,
.ph-header-booking-cta.is-style-picklehub-glass-header,
.ph-header-owner-aware.is-style-picklehub-glass-header {
    background:
        linear-gradient(135deg, rgba(255,255,255,0.90), rgba(235,248,252,0.78));
    box-shadow: 0 10px 30px rgba(15, 35, 55, 0.06);
}

.ph-header-inner,
.ph-header-centered-inner,
.ph-header-booking-inner,
.ph-header-owner-inner,
.ph-footer-inner,
.ph-footer-marketplace-inner,
.ph-footer-minimal-inner {
    width: var(--ph-wide);
    max-width: calc(100vw - 32px);
    margin-left: auto;
    margin-right: auto;
}

.ph-header-inner,
.ph-header-booking-inner,
.ph-header-owner-inner {
    min-height: 74px;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.ph-header-centered-inner {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.ph-header-brand {
    gap: 0.75rem;
}

.ph-header .wp-block-site-title,
.ph-header-centered .wp-block-site-title,
.ph-header-booking-cta .wp-block-site-title,
.ph-header-owner-aware .wp-block-site-title {
    margin: 0;
    font-weight: 950;
    letter-spacing: -0.035em;
}

.ph-header .wp-block-site-title a,
.ph-header-centered .wp-block-site-title a,
.ph-header-booking-cta .wp-block-site-title a,
.ph-header-owner-aware .wp-block-site-title a {
    color: var(--ph-primary-dark);
    text-decoration: none;
}

.ph-header-actions,
.ph-owner-actions {
    gap: 0.65rem;
}

.ph-header-cta {
    white-space: nowrap;
    min-height: 42px;
    padding-inline: 1rem;
    font-size: 0.92rem;
}

.wp-block-navigation.is-style-picklehub-pill-nav .wp-block-navigation-item__content {
    border-radius: 999px;
    padding: 0.45rem 0.7rem;
    text-decoration: none;
    font-weight: 750;
}

.wp-block-navigation.is-style-picklehub-pill-nav .wp-block-navigation-item__content:hover,
.wp-block-navigation.is-style-picklehub-pill-nav .wp-block-navigation-item__content:focus {
    background: var(--ph-primary-soft);
    color: var(--ph-primary-dark);
}

.ph-owner-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border-radius: 999px;
    padding: 0.45rem 0.75rem;
    background: var(--ph-accent-soft);
    color: var(--ph-primary-dark);
    border: 1px solid rgba(31, 199, 166, 0.28);
    font-size: 0.82rem;
    font-weight: 850;
    text-decoration: none;
}

.ph-footer,
.ph-footer-simple,
.ph-footer-marketplace,
.ph-footer-minimal {
    margin-top: 4rem;
    color: rgba(255,255,255,0.84);
}

.ph-footer,
.ph-footer-marketplace {
    background:
        radial-gradient(circle at top left, rgba(31, 199, 166, 0.22), transparent 30rem),
        linear-gradient(135deg, var(--ph-primary-dark) 0%, var(--ph-primary) 100%);
}

.ph-footer-simple,
.ph-footer-minimal {
    background: var(--ph-primary-dark);
}

.ph-footer-inner,
.ph-footer-marketplace-inner {
    padding-top: clamp(2.5rem, 5vw, 4.25rem);
    padding-bottom: clamp(2.5rem, 5vw, 4.25rem);
}

.ph-footer-minimal-inner {
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
}

.ph-footer h2,
.ph-footer h3,
.ph-footer-simple h2,
.ph-footer-simple h3,
.ph-footer-marketplace h2,
.ph-footer-marketplace h3,
.ph-footer-minimal h2,
.ph-footer-minimal h3 {
    color: #ffffff;
}

.ph-footer a,
.ph-footer-simple a,
.ph-footer-marketplace a,
.ph-footer-minimal a {
    color: #ffffff;
    text-decoration-color: rgba(255,255,255,0.35);
}

.ph-footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 0.8fr));
    gap: clamp(1.25rem, 3vw, 2.5rem);
}

.ph-footer-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
    display: grid;
    gap: 0.5rem;
}

.ph-footer-bottom {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.16);
    color: rgba(255,255,255,0.68);
    font-size: 0.88rem;
}

.ph-footer.is-style-picklehub-footer-panel,
.ph-footer-marketplace.is-style-picklehub-footer-panel {
    border-radius: var(--ph-radius-xl) var(--ph-radius-xl) 0 0;
    width: min(1440px, calc(100vw - 16px));
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 8px;
}

@media (max-width: 920px) {
    .ph-header-inner,
    .ph-header-booking-inner,
    .ph-header-owner-inner {
        align-items: flex-start;
    }

    .ph-header-actions,
    .ph-owner-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .ph-footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .ph-header-inner,
    .ph-header-centered-inner,
    .ph-header-booking-inner,
    .ph-header-owner-inner,
    .ph-footer-inner,
    .ph-footer-marketplace-inner,
    .ph-footer-minimal-inner {
        max-width: calc(100vw - 24px);
    }

    .ph-header,
    .ph-header-centered,
    .ph-header-booking-cta,
    .ph-header-owner-aware {
        position: relative;
        top: auto;
    }

    .ph-footer-grid {
        grid-template-columns: 1fr;
    }

    .ph-header-cta {
        width: 100%;
    }
}


/**
 * PickleHub Base Theme - Global Header/Footer Settings v1.2.0.
 */

.picklehub-sticky-header-disabled .ph-header,
.picklehub-sticky-header-disabled .ph-header-centered,
.picklehub-sticky-header-disabled .ph-header-booking-cta,
.picklehub-sticky-header-disabled .ph-header-owner-aware {
    position: relative;
    top: auto;
}

.picklehub-glass-header-disabled .ph-header,
.picklehub-glass-header-disabled .ph-header-centered,
.picklehub-glass-header-disabled .ph-header-booking-cta,
.picklehub-glass-header-disabled .ph-header-owner-aware {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: var(--ph-surface-strong);
}

.picklehub-layout-context-booking .ph-footer,
.picklehub-layout-context-owner .ph-footer {
    margin-top: 2rem;
}

.picklehub-layout-context-booking .ph-footer-minimal,
.picklehub-layout-context-owner .ph-footer-minimal {
    margin-top: 1.5rem;
}

.ph-header-cta:empty {
    display: none;
}



/**
 * PickleHub Base Theme - Width and Title Controls v1.3.0.
 */

.picklehub-sticky-header-disabled .ph-header,
.picklehub-sticky-header-disabled .ph-header-centered,
.picklehub-sticky-header-disabled .ph-header-booking-cta,
.picklehub-sticky-header-disabled .ph-header-owner-aware {
    position: relative;
    top: auto;
}

.picklehub-glass-header-disabled .ph-header,
.picklehub-glass-header-disabled .ph-header-centered,
.picklehub-glass-header-disabled .ph-header-booking-cta,
.picklehub-glass-header-disabled .ph-header-owner-aware {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: var(--ph-surface-strong);
}

.ph-header-cta:empty {
    display: none;
}



/**
 * PickleHub Base Theme - Forced selected page template renderer v1.3.3.
 */

.picklehub-forced-template .picklehub-template-main {
    width: min(100%, 100vw);
}

.picklehub-forced-template-card {
    box-sizing: border-box;
    width: var(--ph-wide);
    max-width: var(--ph-wide);
    margin: 2rem auto;
    padding: clamp(1.25rem, 3vw, 3rem);
}

.picklehub-forced-booking .picklehub-forced-template-card,
.picklehub-forced-owner .picklehub-forced-template-card,
.picklehub-forced-dashboard .picklehub-forced-template-card {
    max-width: var(--ph-container);
}

.picklehub-forced-minimal .picklehub-forced-template-card {
    width: var(--ph-narrow);
    max-width: var(--ph-narrow);
    margin: 2rem auto;
}

.picklehub-forced-template-card .entry-content > *:first-child {
    margin-top: 0;
}

.picklehub-forced-template-card .entry-content > *:last-child {
    margin-bottom: 0;
}



/**
 * PickleHub Base Theme - Slug-based template router v1.3.4.
 */

.picklehub-slug-routed-template .picklehub-template-main {
    min-height: 40vh;
}


/**
 * PickleHub Base Theme - Hard route header/footer renderer v1.4.1.
 */

.picklehub-hard-routed-template .picklehub-template-main {
    width: min(100%, 100vw);
    min-height: 40vh;
}

.picklehub-hard-route-card {
    box-sizing: border-box;
    width: var(--ph-wide);
    max-width: var(--ph-wide);
    margin: 2rem auto;
    padding: clamp(1.25rem, 3vw, 3rem);
}

.picklehub-hard-routed-book-court .picklehub-hard-route-card,
.picklehub-hard-routed-venue-owners .picklehub-hard-route-card {
    width: var(--ph-container);
    max-width: var(--ph-container);
}

.picklehub-hard-route-card .entry-content > *:first-child {
    margin-top: 0;
}

.picklehub-hard-route-card .entry-content > *:last-child {
    margin-bottom: 0;
}


/**
 * PickleHub Base Theme - CPT archive header/footer router v1.4.2.
 */

.picklehub-base-routed-template .picklehub-template-main {
    width: min(100%, 100vw);
    min-height: 40vh;
}

.picklehub-base-route-card {
    box-sizing: border-box;
    width: var(--ph-wide, min(1280px, calc(100vw - 32px)));
    max-width: var(--ph-wide, min(1280px, calc(100vw - 32px)));
    margin: 2rem auto;
    padding: clamp(1.25rem, 3vw, 3rem);
}

.picklehub-base-routed-book-court .picklehub-base-route-card,
.picklehub-base-routed-venue-owners .picklehub-base-route-card {
    width: var(--ph-container, min(1180px, calc(100vw - 32px)));
    max-width: var(--ph-container, min(1180px, calc(100vw - 32px)));
}

.picklehub-base-route-card .entry-content > *:first-child {
    margin-top: 0;
}

.picklehub-base-route-card .entry-content > *:last-child {
    margin-bottom: 0;
}

.picklehub-base-route-archive-content {
    margin-top: 1.25rem;
}

.picklehub-base-route-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.picklehub-base-route-post-card {
    padding: 18px;
    border: 1px solid rgba(15, 118, 110, .16);
    border-radius: 18px;
    background: rgba(255,255,255,.82);
}

.picklehub-base-route-post-card h2 {
    margin: 0 0 8px;
    font-size: 1.15rem;
}

.picklehub-base-route-post-card a {
    color: #0f766e;
    text-decoration: none;
}

.picklehub-base-route-post-card a:hover {
    text-decoration: underline;
}


/**
 * PickleHub Base Theme - CPT template compatibility fix v1.4.3.
 *
 * Plugin CPT templates now keep their native markup. The theme only supplies
 * header/footer through header.php/footer.php classic shell bridges.
 */

.picklehub-classic-shell .picklelapu-location-archive,
.picklehub-classic-shell .picklelapu-single-location {
    width: min(1180px, calc(100vw - 32px));
    margin-inline: auto;
}



/**
 * PickleHub Base Theme - Venue header/footer hard-route fix v1.4.7.
 */
body.picklehub-layout-context-venues .ph-header,
body.picklehub-layout-context-venues .ph-header-centered,
body.picklehub-layout-context-venues .ph-header-booking-cta,
body.picklehub-layout-context-venues .ph-header-owner-aware {
    width: 100%;
}

body.picklehub-layout-context-venues .ph-footer,
body.picklehub-layout-context-venues .ph-footer-simple,
body.picklehub-layout-context-venues .ph-footer-marketplace,
body.picklehub-layout-context-venues .ph-footer-minimal {
    clear: both;
}


/**
 * PickleHub Base Theme - Desktop header nav hard fix v1.4.8.
 * Forces desktop header/navigation to render horizontally even when WP Navigation overlay state leaks open.
 */
@media (min-width: 901px) {
    .ph-header,
    .ph-header-booking-cta,
    .ph-header-owner-aware,
    .ph-header-centered {
        min-height: 0 !important;
        overflow: visible !important;
    }

    .ph-header-inner,
    .ph-header-booking-inner,
    .ph-header-owner-inner {
        min-height: 76px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        flex-wrap: nowrap !important;
        gap: 24px !important;
        padding-top: 12px !important;
        padding-bottom: 12px !important;
    }

    .ph-header-brand {
        display: flex !important;
        align-items: center !important;
        flex: 0 0 auto !important;
        min-width: max-content !important;
    }

    .ph-header-actions,
    .ph-owner-actions {
        width: auto !important;
        max-width: none !important;
        flex: 1 1 auto !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        flex-wrap: nowrap !important;
        gap: 14px !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .ph-header-actions .wp-block-navigation,
    .ph-owner-actions .wp-block-navigation,
    .ph-header-centered .wp-block-navigation {
        position: static !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        width: auto !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .ph-header-actions .wp-block-navigation__responsive-container,
    .ph-owner-actions .wp-block-navigation__responsive-container,
    .ph-header-centered .wp-block-navigation__responsive-container,
    .ph-header-actions .wp-block-navigation__responsive-container.is-menu-open,
    .ph-owner-actions .wp-block-navigation__responsive-container.is-menu-open,
    .ph-header-centered .wp-block-navigation__responsive-container.is-menu-open {
        position: static !important;
        inset: auto !important;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: auto !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        border: 0 !important;
        transform: none !important;
        overflow: visible !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    .ph-header-actions .wp-block-navigation__responsive-container-content,
    .ph-owner-actions .wp-block-navigation__responsive-container-content,
    .ph-header-centered .wp-block-navigation__responsive-container-content,
    .ph-header-actions .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content,
    .ph-owner-actions .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content,
    .ph-header-centered .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
        position: static !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        width: auto !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    .ph-header-actions .wp-block-navigation__container,
    .ph-owner-actions .wp-block-navigation__container,
    .ph-header-centered .wp-block-navigation__container,
    .ph-header-actions .wp-block-navigation ul,
    .ph-owner-actions .wp-block-navigation ul,
    .ph-header-centered .wp-block-navigation ul {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: 6px !important;
        width: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        list-style: none !important;
    }

    .ph-header-actions .wp-block-navigation li,
    .ph-owner-actions .wp-block-navigation li,
    .ph-header-centered .wp-block-navigation li,
    .ph-header-actions .wp-block-navigation-item,
    .ph-owner-actions .wp-block-navigation-item,
    .ph-header-centered .wp-block-navigation-item {
        display: flex !important;
        width: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        list-style: none !important;
    }

    .ph-header-actions .wp-block-navigation li::marker,
    .ph-owner-actions .wp-block-navigation li::marker,
    .ph-header-centered .wp-block-navigation li::marker {
        content: "" !important;
        font-size: 0 !important;
    }

    .ph-header-actions .wp-block-navigation-item__content,
    .ph-owner-actions .wp-block-navigation-item__content,
    .ph-header-centered .wp-block-navigation-item__content {
        display: inline-flex !important;
        width: auto !important;
        min-height: 38px !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 8px 12px !important;
        border-radius: 999px !important;
        background: transparent !important;
        color: var(--ph-primary-dark) !important;
        font-size: 15px !important;
        font-weight: 850 !important;
        line-height: 1 !important;
        text-decoration: none !important;
        white-space: nowrap !important;
    }

    .ph-header-actions .wp-block-navigation-item__content:hover,
    .ph-owner-actions .wp-block-navigation-item__content:hover,
    .ph-header-centered .wp-block-navigation-item__content:hover {
        background: var(--ph-primary-soft) !important;
    }

    .ph-header-actions .wp-block-navigation__responsive-container-open,
    .ph-header-actions .wp-block-navigation__responsive-container-close,
    .ph-owner-actions .wp-block-navigation__responsive-container-open,
    .ph-owner-actions .wp-block-navigation__responsive-container-close,
    .ph-header-centered .wp-block-navigation__responsive-container-open,
    .ph-header-centered .wp-block-navigation__responsive-container-close {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        position: absolute !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
    }

    .ph-header-actions .ph-header-cta,
    .ph-owner-actions .ph-header-cta {
        display: inline-flex !important;
        width: auto !important;
        min-width: max-content !important;
        margin: 0 !important;
        white-space: nowrap !important;
        flex: 0 0 auto !important;
    }
}

/* Mobile gets a simple controlled menu instead of desktop leakage. */
@media (max-width: 900px) {
    .ph-header-inner,
    .ph-header-booking-inner,
    .ph-header-owner-inner {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        flex-wrap: nowrap !important;
        min-height: 72px !important;
    }

    .ph-header-actions,
    .ph-owner-actions {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        width: auto !important;
        flex: 0 0 auto !important;
    }

    .ph-header-actions .ph-header-cta,
    .ph-owner-actions .ph-header-cta {
        display: none !important;
    }

    .wp-block-navigation__responsive-container-open {
        display: inline-flex !important;
    }
}


/**
 * PickleHub Base Theme v1.4.9 - Clean venue footer routing.
 * Non-invasive visibility wrapper for classic plugin templates.
 */
body.single-pickle_location .picklehub-classic-shell footer,
body.post-type-archive-pickle_location .picklehub-classic-shell footer,
body.tax-picklelapu_city .picklehub-classic-shell footer,
body.tax-picklelapu_amenity .picklehub-classic-shell footer,
body.tax-picklelapu_location_type .picklehub-classic-shell footer {
	clear: both;
	width: 100%;
}
