/* =========================================================================
   Page Designer — Off-Canvas Menu Block Styles
   CSS Namespace: pd-blk-oc-*
   ========================================================================= */

/* Setting group labels + dividers (dedicated to offcanvas block) */
.pd-blk-oc-group-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: inherit;
    margin: 6px 0 10px 0;
    padding: 0;
}
.pd-blk-oc-group-label:first-child {
    margin-top: 0;
}
.pd-blk-oc-group-divider {
    border: 0;
    border-top: 2px solid color-mix(in srgb, currentColor 15%, transparent);
    margin: 18px 0 14px 0;
    padding: 0;
    background: transparent;
    height: 0;
}

.pd-blk-oc {
    position: relative;
}

.pd-blk-oc-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: color-mix(in srgb, currentColor 8%, transparent); /* v3.7.21 — neutral trigger, no admin token */
    color: inherit;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.pd-blk-oc-trigger:hover {
    background: color-mix(in srgb, currentColor 14%, transparent); /* v3.7.21 */
}

.pd-blk-oc-trigger-icon {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 18px;
}

.pd-blk-oc-trigger-line {
    height: 2px;
    background: currentColor;
    border-radius: 1px;
    transition: all 0.2s;
}

/* Overlay */
.pd-blk-oc-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5); /* v3.7.21 — overlay scrim, no admin token */
    z-index: 9998;
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.3s;
}

.pd-blk-oc-overlay.pd-blk-oc-active {
    display: block;
    opacity: 1;
}

/* Drawer */
.pd-blk-oc-drawer {
    position: fixed;
    top: 0;
    left: -320px;
    width: 300px;
    height: 100vh;
    background: var(--pd-color-bg, #ffffff); /* v3.7.21 — opaque drawer = page background, no admin token */
    z-index: 9999;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.40);
    transition: left 0.3s ease;
    overflow-y: auto;
}

.pd-blk-oc-drawer.pd-blk-oc-right {
    left: auto;
    right: -320px;
    transition: right 0.3s ease;
}

.pd-blk-oc-drawer.pd-blk-oc-active {
    left: 0;
}

.pd-blk-oc-drawer.pd-blk-oc-right.pd-blk-oc-active {
    left: auto;
    right: 0;
}

.pd-blk-oc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid color-mix(in srgb, currentColor 15%, transparent);
}

.pd-blk-oc-brand {
    color: inherit;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
}

.pd-blk-oc-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color 0.15s;
}

.pd-blk-oc-close:hover {
    color: inherit;
}

.pd-blk-oc-menu {
    display: flex;
    flex-direction: column;
    padding: 16px 0;
}

.pd-blk-oc-link {
    display: block;
    padding: 12px 24px;
    color: inherit;
    text-decoration: none;
    font-size: 15px;
    transition: all 0.15s;
    border-left: 3px solid transparent;
}

.pd-blk-oc-link:hover {
    background: color-mix(in srgb, currentColor 8%, transparent); /* v3.7.21 — neutral hover, no admin token */
    color: inherit;
    border-left-color: var(--pd-link-color, #89b4fa); /* v3.7.23 — accent follows Global Links */
}

.pd-blk-oc-link-active {
    color: var(--pd-link-color, currentColor);
    border-left-color: var(--pd-link-color, #89b4fa); /* v3.7.23 — accent follows Global Links */
    font-weight: 600;
}

/* Editor canvas — show drawer inline for editing */
.gjs-dashed .pd-blk-oc-drawer {
    position: relative;
    left: 0;
    right: auto;
    height: auto;
    min-height: 200px;
    box-shadow: none;
    border: 1px dashed color-mix(in srgb, currentColor 15%, transparent);
    margin-top: 8px;
}

.gjs-dashed .pd-blk-oc-overlay {
    display: none;
}

/* Frontend rendering — off-canvas links/brand must never show an underline. */
.pd-blk-oc-link,
.pd-blk-oc-link:link,
.pd-blk-oc-link:visited,
.pd-blk-oc-link:hover,
.pd-blk-oc-link:focus,
.pd-blk-oc-link:active,
.pd-blk-oc-brand,
.pd-blk-oc-brand:link,
.pd-blk-oc-brand:visited,
.pd-blk-oc-brand:hover,
.pd-blk-oc-brand:focus,
.pd-blk-oc-brand:active {
    text-decoration: none;
}

/* ──────────────────────────────────────────────────────────────────────
 * v2.6.15: Dedicated panel chrome — migrated off shared pd-dsp-*.
 * Duplicated from editor.css:1074-1520 on 2026-04-09, renamed to
 * pd-blk-oc-pnl-*. Intentional fork — do NOT keep in sync with pd-dsp-*.
 * ────────────────────────────────────────────────────────────────────── */
.pd-blk-oc-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-oc-pnl-visible { right: 0; }
.pd-blk-oc-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-oc-pnl-title { font-size: 14px; font-weight: 700; color: var(--at-color-heading, #cdd6f4); }
.pd-blk-oc-pnl-title .fa { color: var(--at-color-primary, #89b4fa); margin-right: 6px; }
.pd-blk-oc-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-oc-pnl-close:hover { color: var(--at-color-destructive, #f38ba8); background: color-mix(in srgb, var(--at-color-destructive, #f38ba8) 10%, transparent); }
.pd-blk-oc-pnl-body { flex: 1; overflow-y: auto; padding: 0; }
.pd-blk-oc-pnl-body::-webkit-scrollbar { width: 5px; }
.pd-blk-oc-pnl-body::-webkit-scrollbar-track { background: var(--at-color-background, #1e1e2e); }
.pd-blk-oc-pnl-body::-webkit-scrollbar-thumb { background: var(--at-color-muted, #45475a); border-radius: 3px; }
.pd-blk-oc-pnl-comp-label,
.pd-blk-oc-pnl-comp-type { display: none !important; }
.pd-blk-oc-pnl-section { border-bottom: 1px solid var(--at-color-border, #313244); }
.pd-blk-oc-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-oc-pnl-section-header:hover { background: color-mix(in srgb, var(--at-color-foreground, #cdd6f4) 3%, transparent); }
.pd-blk-oc-pnl-section-icon { color: var(--at-color-primary, #89b4fa); width: 16px; text-align: center; font-size: 12px; }
.pd-blk-oc-pnl-section-arrow {
    margin-left: auto; font-size: 10px; color: var(--at-color-muted-foreground, #6c7086);
    transition: transform 0.25s ease;
}
.pd-blk-oc-pnl-open > .pd-blk-oc-pnl-section-header .pd-blk-oc-pnl-section-arrow {
    transform: rotate(180deg);
}
.pd-blk-oc-pnl-section-body { padding: 4px 16px 16px; }
.pd-blk-oc-pnl-field { margin-bottom: 12px; }
.pd-blk-oc-pnl-field-label {
    display: block; font-size: 12px; font-weight: 600;
    color: var(--at-color-card-foreground); margin-bottom: 4px;
}
.pd-blk-oc-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-oc-pnl-input:focus { border-color: var(--at-color-primary, #89b4fa); }
.pd-blk-oc-pnl-select { cursor: pointer; -webkit-appearance: auto; appearance: auto; }
.pd-blk-oc-pnl-select option { background: var(--at-color-secondary, #313244); color: var(--at-color-foreground, #cdd6f4); }
.pd-blk-oc-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-oc-pnl-color:hover { border-color: var(--at-color-primary, #89b4fa); }
.pd-blk-oc-pnl-slider-field {
    display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
}
.pd-blk-oc-pnl-slider-field:last-child { margin-bottom: 0; }
.pd-blk-oc-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-oc-pnl-slider-val {
    font-size: 12px; font-weight: 600; color: var(--at-color-foreground, #cdd6f4);
    min-width: 24px; text-align: right;
}
.pd-blk-oc-pnl-slider-unit { font-size: 10px; color: var(--at-color-muted-foreground, #6c7086); }
