/**
 * DpNEx — Minimal brand CSS
 * Loaded via functions.php wp_enqueue_scripts
 * Hides Logisto theme header/footer on standalone DpNEx pages
 * and applies base font/spacing fixes.
 */

/* -------------------------------------------------------
   STANDALONE PAGE: hide native Logisto theme chrome
   ------------------------------------------------------- */
body.dpnex-standalone .site-header,
body.dpnex-standalone .site-footer,
body.dpnex-standalone #masthead,
body.dpnex-standalone #colophon,
body.dpnex-standalone .top-bar,
body.dpnex-standalone .header-wrap,
body.dpnex-standalone .main-navigation,
body.dpnex-standalone .breadcrumb-area,
body.dpnex-standalone .page-header {
    display: none !important;
}

/* Remove default page padding added by Logisto */
body.dpnex-standalone #page,
body.dpnex-standalone #content,
body.dpnex-standalone .site-content,
body.dpnex-standalone .content-area {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
}

/* -------------------------------------------------------
   BASE FONT
   ------------------------------------------------------- */
body {
    font-family: 'Segoe UI', Arial, Helvetica, sans-serif;
}

/* -------------------------------------------------------
   WORDPRESS ADMIN BAR SPACING
   ------------------------------------------------------- */
body.admin-bar .dpnex-hero,
body.admin-bar .track-hero,
body.admin-bar .about-hero,
body.admin-bar .services-hero,
body.admin-bar .contact-hero {
    /* WP admin bar is 32px tall (46px on mobile) — push hero down */
    padding-top: calc(60px + 32px);
}

@media screen and (max-width: 782px) {
    body.admin-bar .dpnex-hero,
    body.admin-bar .track-hero,
    body.admin-bar .about-hero,
    body.admin-bar .services-hero,
    body.admin-bar .contact-hero {
        padding-top: calc(60px + 46px);
    }
}

/* -------------------------------------------------------
   TOM SELECT — ensure dropdown is never clipped
   ------------------------------------------------------- */
/* Logisto containers default to overflow:auto/hidden — override so
   Tom Select dropdowns (position:absolute) can escape their bounds */
body.dpnex-standalone #page,
body.dpnex-standalone #content,
body.dpnex-standalone .site-content,
body.dpnex-standalone .content-area,
body.dpnex-standalone #primary,
body.dpnex-standalone .entry-content {
    overflow: visible !important;
}

.ts-dropdown {
    z-index: 10000 !important;
}

/* Make the Tom Select control pointer-accessible even if theme sets otherwise */
.ts-wrapper,
.ts-wrapper .ts-control,
.ts-wrapper .ts-control * {
    pointer-events: auto !important;
}

/* -------------------------------------------------------
   TOM SELECT — DPD-style appearance
   ------------------------------------------------------- */
.ts-wrapper.single .ts-control {
    padding: 10px 12px;
    font-size: 14px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    min-height: 42px;
    cursor: pointer;
}
.ts-wrapper.single.focus .ts-control,
.ts-wrapper.single .ts-control:focus-within {
    border-color: #1B2A6B;
    box-shadow: 0 0 0 2px rgba(27,42,107,.12);
}
.ts-dropdown {
    border: 1px solid #ccc !important;
    box-shadow: 0 4px 16px rgba(0,0,0,.15) !important;
    border-radius: 4px !important;
    background: #fff;
}
.ts-dropdown .option {
    padding: 9px 12px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
}
.ts-dropdown .option:hover,
.ts-dropdown .option.active {
    background: #1B2A6B !important;
    color: #fff !important;
}
.ts-dropdown .option.selected {
    background: #e8ecf8;
    color: #1B2A6B;
    font-weight: 700;
}
.ts-dropdown .option.selected:hover,
.ts-dropdown .option.selected.active {
    background: #1B2A6B !important;
    color: #fff !important;
}
/* Section separators */
.ts-dropdown .option[disabled],
.ts-dropdown .option.ts-sep {
    color: #888 !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: .05em;
    background: #f5f5f5 !important;
    padding: 6px 12px !important;
    cursor: default !important;
    pointer-events: none !important;
}
.ts-dropdown-content {
    max-height: 320px;
    overflow-y: auto;
}
/* Search input inside dropdown */
.ts-dropdown .ts-dropdown-content input.dropdown-input {
    padding: 8px 12px;
    font-size: 14px;
    border-bottom: 1px solid #e0e0e0;
    width: 100%;
    outline: none;
}

/* -------------------------------------------------------
   PREVENT ELEMENTOR FROM ADDING UNWANTED MARGINS
   ------------------------------------------------------- */
body.dpnex-standalone .elementor-section,
body.dpnex-standalone .elementor-widget-wrap {
    padding: 0 !important;
    margin: 0 !important;
}

/* -------------------------------------------------------
   ENSURE FULL-WIDTH TEMPLATES HAVE NO SIDEBAR GAP
   ------------------------------------------------------- */
body.dpnex-standalone #primary,
body.dpnex-standalone #secondary,
body.dpnex-standalone .widget-area {
    display: none !important;
}
