/* =========================================================================
   Page Designer — Navbar Block Styles
   CSS Namespace: pd-blk-nav-*
   ========================================================================= */

/* Setting group labels + dividers (dedicated to navbar block) */
.pd-blk-nav-group-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--at-color-card-foreground);
    margin: 6px 0 10px 0;
    padding: 0;
}
.pd-blk-nav-group-label:first-child {
    margin-top: 0;
}
.pd-blk-nav-group-divider {
    border: 0;
    border-top: 2px solid var(--at-color-input, #11111b);
    margin: 18px 0 14px 0;
    padding: 0;
    background: transparent;
    height: 0;
}

/* Items header — Sync + Add buttons */
.pd-blk-nav-items-header {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}
.pd-blk-nav-action-btn {
    flex: 1;
    background: var(--at-color-secondary, #313244);
    border: 1px solid var(--at-color-border, #45475a);
    color: var(--at-color-card-foreground);
    padding: 7px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s;
}
.pd-blk-nav-action-btn:hover {
    background: var(--at-color-muted, #45475a);
    border-color: var(--at-color-primary, #89b4fa);
}
.pd-blk-nav-action-btn .fa {
    margin-right: 4px;
}
.pd-blk-nav-add-btn {
    border-color: var(--at-color-border, #89b4fa);
    color: var(--at-color-primary);
}
.pd-blk-nav-add-btn:hover {
    background: color-mix(in srgb, var(--at-color-primary, #89b4fa) 15%, transparent);
}

/* Item list */
.pd-blk-nav-items-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.pd-blk-nav-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    background: var(--at-color-secondary, #313244);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
}
.pd-blk-nav-item:hover {
    background: var(--at-color-muted, #45475a);
}
.pd-blk-nav-item-drag {
    color: var(--at-color-card-foreground);
    cursor: grab;
    font-size: 10px;
    letter-spacing: -2px;
    width: 12px;
    flex-shrink: 0;
    user-select: none;
}
.pd-blk-nav-item:hover .pd-blk-nav-item-drag {
    color: var(--at-color-primary);
}
.pd-blk-nav-item-type {
    font-size: 11px;
    color: var(--at-color-primary);
    width: 14px;
    text-align: center;
    flex-shrink: 0;
}
.pd-blk-nav-item-label {
    flex: 1;
    font-size: 12px;
    color: var(--at-color-card-foreground);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pd-blk-nav-item-edit,
.pd-blk-nav-item-sethome,
.pd-blk-nav-item-delete {
    background: none;
    border: none;
    color: var(--at-color-primary);
    cursor: pointer;
    padding: 3px 5px;
    font-size: 11px;
    border-radius: 3px;
    transition: all 0.15s;
    opacity: 0;
}
.pd-blk-nav-item:hover .pd-blk-nav-item-edit,
.pd-blk-nav-item:hover .pd-blk-nav-item-sethome,
.pd-blk-nav-item:hover .pd-blk-nav-item-delete {
    opacity: 1;
}
/* Says what the pencil does — the pages list is the only route to a page's
   SEO settings, so the icon needs a label. */
.pd-blk-nav-seo-hint {
    margin: 0 0 8px;
    font-size: 11px;
    line-height: 1.45;
    color: var(--at-color-muted-foreground);
}
.pd-blk-nav-seo-hint .fa { margin-right: 4px; }

/* Placeholder standing in for the absent "set as homepage" button so the
   trailing icons line up across every row. Mirrors that button's box exactly —
   only the paint is removed. */
.pd-blk-nav-item-slot {
    padding: 3px 5px;
    font-size: 11px;
    visibility: hidden;
    pointer-events: none;
}
.pd-blk-nav-item-sethome { color: var(--at-color-muted-foreground); }
.pd-blk-nav-item-sethome:hover { color: var(--at-color-primary); }
/* "editing" marker — says which page you have open WITHOUT borrowing the home
   icon, which is what made About look like the homepage. */
.pd-blk-nav-item-editing {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    padding: 1px 5px;
    margin-right: 2px;
    border-radius: 999px;
    color: var(--at-color-muted-foreground);
    background: var(--at-color-secondary);
    border: 1px solid var(--at-color-border);
}
.pd-blk-nav-item-edit:hover { color: color-mix(in srgb, var(--at-color-primary, #89b4fa) 85%, var(--at-color-foreground, #cdd6f4)); }
.pd-blk-nav-item-delete:hover { color: var(--at-color-destructive, #f38ba8); }

.pd-blk-nav-empty {
    padding: 20px 12px;
    font-size: 12px;
    color: var(--at-color-card-foreground);
    text-align: center;
    background: var(--at-color-secondary, #313244);
    border-radius: 6px;
}

/* Drag states */
.pd-blk-nav-dragging { opacity: 0.4; }
.pd-blk-nav-drag-over { outline: 2px solid var(--at-color-primary, #89b4fa); outline-offset: -2px; }

/* Edit item — back button */
.pd-blk-nav-edit-back {
    background: none;
    border: none;
    color: var(--at-color-primary);
    cursor: pointer;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: auto;
}
.pd-blk-nav-edit-back:hover {
    background: color-mix(in srgb, var(--at-color-primary, #89b4fa) 10%, transparent);
}
.pd-blk-nav-edit-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--at-color-border, #313244);
}

/* Pages list */
.pd-blk-nav-pages-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.pd-blk-nav-page-row {
    padding: 7px 10px;
}
.pd-blk-nav-page-active {
    border-left: 2px solid var(--at-color-primary, #89b4fa);
}
.pd-blk-nav-page-nav,
.pd-blk-nav-page-rename,
.pd-blk-nav-page-delete {
    background: none;
    border: none;
    color: var(--at-color-primary);
    cursor: pointer;
    padding: 3px 5px;
    font-size: 11px;
    border-radius: 3px;
    transition: all 0.15s;
    opacity: 0;
    flex-shrink: 0;
}
.pd-blk-nav-page-row:hover .pd-blk-nav-page-nav,
.pd-blk-nav-page-row:hover .pd-blk-nav-page-rename,
.pd-blk-nav-page-row:hover .pd-blk-nav-page-delete {
    opacity: 1;
}
.pd-blk-nav-page-nav:hover { color: color-mix(in srgb, var(--at-color-primary, #89b4fa) 85%, var(--at-color-foreground, #cdd6f4)); }
.pd-blk-nav-page-rename:hover { color: color-mix(in srgb, var(--at-color-primary, #89b4fa) 85%, var(--at-color-foreground, #cdd6f4)); }
.pd-blk-nav-page-delete:hover { color: var(--at-color-destructive, #f38ba8); }

/* Divider for unlinked pages */
.pd-blk-nav-divider {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0 6px;
    font-size: 10px;
    color: var(--at-color-card-foreground);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.pd-blk-nav-divider::before,
.pd-blk-nav-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--at-color-secondary, #313244);
}
.pd-blk-nav-unlinked {
    opacity: 0.7;
    border: 1px dashed var(--at-color-border, #45475a);
    cursor: pointer;
}
.pd-blk-nav-unlinked:hover {
    opacity: 1;
    border-color: var(--at-color-status-success, #a6e3a1);
    background: var(--at-color-card);
}

/* Toggle checkbox labels */
.pd-blk-nav-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--at-color-card-foreground);
    cursor: pointer;
}
.pd-blk-nav-toggle input[type="checkbox"] {
    accent-color: var(--at-color-primary, #89b4fa);
    width: 14px;
    height: 14px;
}

/* =============================================================================
   Frontend rendering — navigation links must never show an underline,
   even on hover/focus. The default browser anchor :hover decoration leaks
   through unless explicitly suppressed.
   ============================================================================= */
.navbar-menu-link,
.navbar-menu-link:link,
.navbar-menu-link:visited,
.navbar-menu-link:hover,
.navbar-menu-link:focus,
.navbar-menu-link:active,
.navbar-brand,
.navbar-brand:link,
.navbar-brand:visited,
.navbar-brand:hover,
.navbar-brand:focus,
.navbar-brand:active {
    text-decoration: none;
}

/* =============================================================================
   Vertically centre the brand text within the navbar bar.
   Targets .pd-nav-brand — a DEDICATED class added to every brand element
   by navbar.js (both fresh navbars and existing ones, backfilled on
   selection). Using our own namespace means we never collide with the
   grapesjs-navbar plugin's .navbar-brand defaults, and !important pins
   the win regardless of source order vs the saved css_content blob.
   ============================================================================= */
.pd-nav-brand {
    display: inline-flex !important;
    align-items: center !important;
    padding: 10px 15px !important;
    line-height: 1 !important;
    align-self: center !important;
}

/* =============================================================================
   Brand Text must NEVER inherit hover behaviour from the global Theme>Links
   rules (a:hover { color/text-decoration }). The brand is a navbar identity
   element, not a navigational link — it has its own dedicated Brand Color
   setting and stays static on hover.
   ============================================================================= */
.pd-nav-brand,
.pd-nav-brand:hover,
.pd-nav-brand:focus,
.pd-nav-brand:active,
.pd-nav-brand:visited {
    color: inherit;
    text-decoration: none !important;
}
.pd-nav-brand:hover {
    /* Lock the hover color to whatever the brand currently is — wins over
       the global a:hover rule because of the dedicated class + !important. */
    color: var(--pd-nav-brand-color, inherit) !important;
}

/* ──────────────────────────────────────────────────────────────────────
 * v2.6.15: Dedicated panel chrome — migrated off shared pd-dsp-*.
 * Duplicated from editor.css:1074-1395 on 2026-04-09, renamed to
 * pd-blk-nav-pnl-*. Includes the image upload chrome (used only by
 * the navbar logo upload UI). Intentional fork — do NOT keep in sync.
 * ────────────────────────────────────────────────────────────────────── */
.pd-blk-nav-pnl {
    position: fixed; top: 50px; right: -300px; width: 300px;
    height: calc(100vh - 50px); background: var(--at-color-background, #1e1e2e);
    border-left: 1px solid var(--at-color-border, #313244); z-index: 9000;
    display: flex; flex-direction: column;
    transition: right 0.25s ease; overflow: hidden;
}
.pd-blk-nav-pnl-visible { right: 0; }
.pd-blk-nav-pnl-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px; border-bottom: 1px solid var(--at-color-border, #313244);
    background: var(--at-color-card, #181825); flex-shrink: 0;
}
.pd-blk-nav-pnl-title { font-size: 14px; font-weight: 700; color: var(--at-color-heading, #cdd6f4); }
.pd-blk-nav-pnl-title .fa { color: var(--at-color-primary, #89b4fa); margin-right: 6px; }
.pd-blk-nav-pnl-close {
    background: none; border: none; color: var(--at-color-muted-foreground, #6c7086);
    cursor: pointer; font-size: 16px; padding: 4px 6px; border-radius: 4px;
}
.pd-blk-nav-pnl-close:hover { color: var(--at-color-destructive, #f38ba8); background: color-mix(in srgb, var(--at-color-destructive, #f38ba8) 10%, transparent); }
.pd-blk-nav-pnl-body { flex: 1; overflow-y: auto; padding: 0; }
.pd-blk-nav-pnl-body::-webkit-scrollbar { width: 5px; }
.pd-blk-nav-pnl-body::-webkit-scrollbar-track { background: var(--at-color-background, #1e1e2e); }
.pd-blk-nav-pnl-body::-webkit-scrollbar-thumb { background: var(--at-color-muted, #45475a); border-radius: 3px; }
.pd-blk-nav-pnl-comp-label,
.pd-blk-nav-pnl-comp-type { display: none !important; }
.pd-blk-nav-pnl-section { border-bottom: 1px solid var(--at-color-border, #313244); }
.pd-blk-nav-pnl-section-header {
    display: flex; align-items: center; gap: 8px; padding: 10px 16px;
    color: var(--at-color-card-foreground); font-size: 13px; font-weight: 600;
    cursor: pointer; user-select: none; transition: background 0.15s;
}
.pd-blk-nav-pnl-section-header:hover { background: color-mix(in srgb, var(--at-color-foreground, #cdd6f4) 3%, transparent); }
.pd-blk-nav-pnl-section-icon { color: var(--at-color-primary, #89b4fa); width: 16px; text-align: center; font-size: 12px; }
.pd-blk-nav-pnl-section-arrow {
    margin-left: auto; font-size: 10px; color: var(--at-color-muted-foreground, #6c7086);
    transition: transform 0.25s ease;
}
.pd-blk-nav-pnl-open > .pd-blk-nav-pnl-section-header .pd-blk-nav-pnl-section-arrow {
    transform: rotate(180deg);
}
.pd-blk-nav-pnl-section-body { padding: 4px 16px 16px; }
.pd-blk-nav-pnl-field { margin-bottom: 12px; }
.pd-blk-nav-pnl-field-label {
    display: block; font-size: 12px; font-weight: 600;
    color: var(--at-color-card-foreground); margin-bottom: 4px;
}
.pd-blk-nav-pnl-input {
    width: 100%; background: var(--at-color-secondary, #313244); border: 1px solid var(--at-color-border, #45475a);
    color: var(--at-color-card-foreground); padding: 8px 10px; border-radius: 6px;
    font-size: 13px; outline: none; transition: border-color 0.15s;
    box-sizing: border-box;
}
.pd-blk-nav-pnl-input:focus { border-color: var(--at-color-primary, #89b4fa); }
.pd-blk-nav-pnl-select { cursor: pointer; -webkit-appearance: auto; appearance: auto; }
.pd-blk-nav-pnl-select option { background: var(--at-color-secondary, #313244); color: var(--at-color-foreground, #cdd6f4); }
.pd-blk-nav-pnl-color {
    width: 100%; height: 36px; border: 1px solid var(--at-color-border, #45475a);
    border-radius: 6px; cursor: pointer; padding: 0; background: var(--at-color-secondary, #313244);
}
.pd-blk-nav-pnl-color:hover { border-color: var(--at-color-primary, #89b4fa); }
.pd-blk-nav-pnl-slider-field {
    display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
}
.pd-blk-nav-pnl-slider-field:last-child { margin-bottom: 0; }
.pd-blk-nav-pnl-slider {
    flex: 1; height: 6px; cursor: pointer; accent-color: var(--at-color-primary, #89b4fa);
    background: var(--at-color-secondary, #313244); border-radius: 3px;
    -webkit-appearance: auto; appearance: auto;
}
.pd-blk-nav-pnl-slider-val {
    font-size: 12px; font-weight: 600; color: var(--at-color-foreground, #cdd6f4);
    min-width: 24px; text-align: right;
}
.pd-blk-nav-pnl-slider-unit { font-size: 10px; color: var(--at-color-muted-foreground, #6c7086); }
/* Image upload field (logo upload only) */
.pd-blk-nav-pnl-img-upload {
    display: flex; flex-direction: column; gap: 6px;
}
.pd-blk-nav-pnl-img-preview {
    display: none; width: 100%; height: 80px;
    border-radius: 6px; overflow: hidden;
    border: 1px solid var(--at-color-border, #45475a); background: var(--at-color-input, #11111b);
}
.pd-blk-nav-pnl-img-preview img {
    width: 100%; height: 100%; object-fit: cover;
}
.pd-blk-nav-pnl-img-input-wrap { display: flex; gap: 0; }
.pd-blk-nav-pnl-img-input-wrap .pd-blk-nav-pnl-input {
    border-radius: 6px 0 0 6px; border-right: none;
}
.pd-blk-nav-pnl-img-upload-btn {
    background: var(--at-color-primary, #89b4fa); border: 1px solid var(--at-color-border, #89b4fa); color: var(--at-color-background, #1e1e2e);
    padding: 0 12px; border-radius: 0 6px 6px 0;
    cursor: pointer; font-size: 13px; transition: all 0.15s;
    flex-shrink: 0;
}
.pd-blk-nav-pnl-img-upload-btn:hover {
    background: color-mix(in srgb, var(--at-color-primary, #89b4fa) 85%, var(--at-color-foreground, #cdd6f4)); border-color: var(--at-color-primary, #89b4fa); color: var(--at-color-background, #1e1e2e);
}

/* =============================================================================
   Wizard-generated site navigation
   -----------------------------------------------------------------------------
   The step wizard builds every page with a navbar (helpers/pd_wizard_nav_helper.php)
   and tags it data-pd-nav-uid="wznav{website_id}". These rules give that navbar
   its brand skin from the page's own --pd-* theme tokens, so a generated site's
   nav re-colours with the rest of the page instead of staying vendor grey.

   They live HERE, in the navbar block's own stylesheet, rather than in the page's
   saved css_content, because:
     * both the published page (pd_brh_block_css_links) and the editor canvas
       (views/_pd_editor_config_common.php) auto-load this file — one source, two
       surfaces, no shared-file wiring;
     * css_content is regenerated from editor.getCss() on every save, so anything
       written there at build time would vanish the first time the user saves.

   Scoped to the wznav* instance prefix, so a hand-built navbar is never touched.
   Every value falls back to `inherit`/the vendor default when a token is absent.
   Specificity ties with the per-instance rules navbar.js writes into css_content,
   and css_content is emitted after this file, so a user's own edits still win.
   ============================================================================= */
.navbar[data-pd-nav-uid^="wznav"] {
    background: var(--pd-color-section, #111827);
    border-bottom: 1px solid color-mix(in srgb, var(--pd-general-color, #888888) 22%, transparent);
    width: 100%;
    min-height: 64px;
    margin-bottom: 0;
    box-sizing: border-box;
}
[data-pd-nav-uid^="wznav"] .navbar-container {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}
[data-pd-nav-uid^="wznav"] .navbar-brand {
    color: var(--pd-header-color, inherit);
    font-family: var(--pd-header-font, inherit);
    font-weight: 700;
    font-size: 20px;
    min-width: 0;
    min-height: 0;
    text-decoration: none;
    white-space: nowrap;
}
[data-pd-nav-uid^="wznav"] .navbar-items-c {
    display: flex;
    justify-content: flex-end;
    flex: 1;
}
[data-pd-nav-uid^="wznav"] .navbar-menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
}
[data-pd-nav-uid^="wznav"] .navbar-menu-link {
    color: var(--pd-general-color, inherit);
    font-family: var(--pd-general-font, inherit);
    font-size: 15px;
    padding: 10px 14px;
    text-decoration: none;
    border-radius: var(--pd-btn-radius, 4px);
    transition: color .15s, background .15s;
}
[data-pd-nav-uid^="wznav"] .navbar-menu-link:hover,
[data-pd-nav-uid^="wznav"] .navbar-menu-link:focus {
    color: var(--pd-link-color, inherit);
}
[data-pd-nav-uid^="wznav"] .navbar-menu-link-active,
[data-pd-nav-uid^="wznav"] .navbar-menu-link[aria-current="page"] {
    color: var(--pd-link-color, inherit);
    /* Emphasis WITHOUT changing the text's width.
       font-weight:600 made the current page's link wider than the others, so
       every link after it slid along — and since a different page is current on
       each page, the whole menu appeared to shift as you clicked around the
       site. Painting the glyphs a fraction thicker gives the same emphasis with
       identical metrics, so nothing reflows. */
    text-shadow: 0.35px 0 0 currentColor, -0.35px 0 0 currentColor;
}
[data-pd-nav-uid^="wznav"] .navbar-burger {
    width: 44px;
    padding: 5px 10px;
    margin: 10px 0;
    cursor: pointer;
    display: none;
}
[data-pd-nav-uid^="wznav"] .navbar-burger-line {
    padding: 1px;
    margin: 5px 0;
    background: var(--pd-general-color, #cccccc);
}
@media (max-width: 768px) {
    [data-pd-nav-uid^="wznav"] .navbar-items-c { display: none; }
    [data-pd-nav-uid^="wznav"] .navbar-burger  { display: block; }
}

/* ==========================================================================
 * Container Width — where the logo and links sit inside the bar
 *
 * Keyed off the attribute the panel already stores, so it applies the moment a
 * navbar exists: no waiting for the vendor plugin to finish building children,
 * and no per-component styles to race with.
 *
 *   Full Width            — bar spans the viewport, CONTENTS line up with the
 *                           page's own content column so the logo sits directly
 *                           above the copy below it. Follows the page's Content
 *                           Width setting, so changing that moves the nav too.
 *   Full Width (extended) — bar AND contents edge to edge: logo hard left,
 *                           menu hard right.
 *
 * A capped width (Wide/Standard/Narrow/Blog) puts the cap on the BAR, so the
 * container just fills it — no rule needed here.
 * ========================================================================== */
.navbar[data-pd-custom-width="100%"] > .navbar-container {
    max-width: var(--pd-container-width, 1400px);
    margin-left: auto;
    margin-right: auto;
}
.navbar[data-pd-custom-width="100%-ext"] > .navbar-container {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
}

/* "Use this header on every page" — the header is site chrome, so it is shared
   deliberately rather than page by page. Own pd-blk-nav-sync-* names. */
.pd-blk-nav-sync-field { margin-top: 10px; }
.pd-blk-nav-sync-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    justify-content: center;
    padding: 8px 10px;
    background: var(--at-color-secondary);
    color: var(--at-color-card-foreground);
    border: 1px solid var(--at-color-border);
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
}
.pd-blk-nav-sync-btn:hover { background: var(--at-color-muted); }
.pd-blk-nav-sync-btn[disabled] { cursor: default; opacity: 0.7; }
.pd-blk-nav-sync-hint {
    margin: 6px 0 0;
    font-size: 10px;
    line-height: 1.5;
    color: var(--at-color-muted-foreground);
}
