/* Base layout rules for Athena
 * Loaded by core/templates/base.html on every page.
 * Keep this file focused on global page chrome: body overflow, the
 * .content column, container/row resets, long-text breaking, and the
 * dropdown-item submit button used for logout. Component-specific or
 * Bootswatch-defensive rules belong in theme-compatibility.css. Touch /
 * accessibility sizing belongs in touch-targets.css.
 */

/* Main content column inside .container-fluid > .row */
.content {
    padding: 20px;
    min-width: 0; /* prevent flex items from overflowing */
}

/* Stop horizontal scroll caused by stray full-bleed elements */
body {
    overflow-x: hidden;
}

/* Reset Bootstrap container-fluid padding so the navbar/footer go
 * edge-to-edge; the navbar re-adds its own padding via
 * navbar-spacing.css.
 *
 * Do NOT add `overflow-x: auto` here — `.container-fluid` is also
 * the inner wrapper of the navbar, and any overflow value on it
 * creates a new clipping context that traps absolutely-positioned
 * dropdown menus inside the navbar height. Horizontal-scroll
 * prevention is handled at the body level via `overflow-x: hidden`,
 * and wide content (tables) opts in via `.table-responsive` from
 * theme-compatibility.css.
 */
.container-fluid {
    padding-left: 0;
    padding-right: 0;
}

/* Force-break very long words/URLs in any element marked .text-break.
 * Overrides Bootstrap's default which only sets word-wrap. */
.text-break {
    word-break: break-all;
    overflow-wrap: break-word;
}

/* Mobile: give stacked column children some breathing room when the
 * .col-md-* grid collapses to a single column. */
@media (max-width: 768px) {
    .row .col-md-6,
    .row .col-md-4,
    .row .col-md-3 {
        margin-bottom: 1rem;
    }
}

/* Dropdown item rendered as a <button type="submit"> (e.g. logout
 * inside a POST form). Strips the native button chrome so it visually
 * matches sibling <a class="dropdown-item"> entries. */
.dropdown-item-button {
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}
