/* Sizes are in px, not rem: the theme root is 10px but /guides/ is 16px (kanban #163).
 */
/*
 * Cookie banner (kanban #162): small and calm, at the bottom of the screen,
 * in the house look (approved 3 October 2026). The page stays usable behind
 * it: no overlay, and the body gets bottom padding the height of the banner
 * (assets/js/ptb-consent.js) so nothing is hidden underneath.
 * Accept and Decline are the same size and the same style on purpose.
 * Loaded on its own by default.hbs, outside the built screen.css.
 */

.ptb-consent {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 3999999; /* above Ghost Portal's floating button */
    padding: 0 12px 12px;
    font-family: var(--ptb-sans, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif);
    pointer-events: none;
}

.ptb-consent[hidden] {
    display: none;
}

.ptb-consent:focus {
    outline: none;
}

.ptb-consent-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 24px;
    box-sizing: border-box;
    max-width: 960px;
    margin: 0 auto;
    padding: 14px 18px;
    color: var(--ptb-ink, #15171a);
    background: var(--ptb-paper, #fff);
    border: 1px solid var(--ptb-rule, #e4e5e7);
    border-top: 3px solid var(--ptb-navy, #2b4760);
    border-radius: 4px;
    box-shadow: 0 6px 24px rgba(21, 23, 26, 0.12);
    pointer-events: auto;
}

.ptb-consent-text {
    flex: 1 1 420px;
    min-width: 0;
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

.ptb-consent-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
}

.ptb-consent-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-width: 112px;
    margin: 0;
    padding: 9px 16px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--ptb-navy, #2b4760);
    background: var(--ptb-paper, #fff);
    border: 2px solid var(--ptb-navy, #2b4760);
    border-radius: 3px;
    cursor: pointer;
}

.ptb-consent-btn:hover {
    color: #fff;
    background: var(--ptb-navy, #2b4760);
}

.ptb-consent-btn:focus-visible,
.ptb-consent-link:focus-visible {
    outline: 3px solid var(--ptb-pink-text, #d1105a);
    outline-offset: 2px;
}

.ptb-consent-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--ptb-pink-text, #d1105a);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.ptb-consent-link:hover {
    color: var(--ptb-pink-text-hover, #b00d4b);
}

@media (max-width: 600px) {
    .ptb-consent {
        padding: 0 8px 8px;
    }

    .ptb-consent-inner {
        padding: 12px 14px;
    }

    .ptb-consent-text {
        flex-basis: 100%;
    }

    .ptb-consent-actions {
        width: 100%;
    }

    .ptb-consent-btn {
        flex: 1 1 0;
        min-width: 0;
    }

    .ptb-consent-link {
        flex-basis: 100%;
        text-align: center;
    }
}

/*
 * The cookie table in section 7 of the privacy page: wrap the text so all
 * four columns are readable without scrolling sideways inside the table
 * (the theme's tables do not wrap). Scoped to the privacy page only.
 */
.page-privacy .gh-content table:not(.gist table) {
    display: table;
    width: 100%;
    white-space: normal;
    font-size: 15px;
    line-height: 1.45;
    table-layout: auto;
}

.page-privacy .gh-content table:not(.gist table) td,
.page-privacy .gh-content table:not(.gist table) th {
    vertical-align: top;
    word-break: normal; /* .gh-content breaks mid-word; break at spaces and hyphens */
    overflow-wrap: break-word;
}

@media (max-width: 600px) {
    .page-privacy .gh-content table:not(.gist table) {
        font-size: 13px;
    }

    .page-privacy .gh-content table:not(.gist table) td,
    .page-privacy .gh-content table:not(.gist table) th {
        padding: 6px 7px;
    }
}
