/* ==========================================================================
   Enhanced Links — Embed Mode & Modal Styling
   ========================================================================== */

/* Embed mode: strip site chrome when page is loaded in the overlay iframe.
   Activated by ?embed=1 query parameter adding .embed-mode to <body>. */

.embed-mode > main > header,
.embed-mode footer,
.embed-mode .wagtail-userbar,
.embed-mode #cookie-consent-banner,
.embed-mode .cookie-consent-banner {
    display: none !important;
}

/* For docs layout pages, hide sidebars and expand content to full width */
.embed-mode #docs-sidebar-left,
.embed-mode #docs-sidebar-right,
.embed-mode #toggle-docs-sidebar-left,
.embed-mode #toggle-docs-sidebar-right {
    display: none !important;
}

.embed-mode .docs-layout-content {
    grid-column: 1 / -1;
    padding: 1rem 2rem;
}

/* Modal styling */
#enhanced-link-modal .modal-body {
    min-height: 300px;
    background: #f8f9fa;
}

#enhanced-link-modal .modal-header {
    border-bottom: 1px solid #dee2e6;
    background: #f8f9fa;
}

#enhanced-link-modal .modal-body {
    overflow: hidden;
    border-radius: 0 0 var(--bs-modal-inner-border-radius) var(--bs-modal-inner-border-radius);
}

#enhanced-link-open-tab {
    text-decoration: none;
}

.modal-title {
    margin-bottom: 0;
    margin-top: 0;
}