/**
 * Theme Name: Scouts
 * Template:   twentytwentyfive
 * Theme URI:  https://12thchichester.org.uk
 * Description: A custom theme for 12th chichester scouts.
 * Version: 0.2
 * Author: George Barrett
 * Author URI: https://gcbarrett.com
 */

.cover-box-with-buttons>.wp-block-cover__background {
    width: 0px;
    height: 0px;
}

.cover-box-with-buttons>.wp-block-cover__inner-container {
    background-color: #000000ab;
    padding: 1em;
}

.center-img>img {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.wp-block-columns:has(div.cols-center) {
    min-height: 215px;
}

div:has(div.col-center) {
    height: 100%;
}

@media (min-width: 1201px) {
    div.cover-box-with-buttons>div.wp-block-cover__image-background {
        background-position: 50% 0% !important;
        /* background-color: #000000ab; */
        /* background-color: #1d2327; */
        background-repeat: no-repeat;
        background-size: auto !important;
    }

    div.cover-box-with-buttons>div.wp-block-cover__image-background::after {
        content: "";
        position: absolute;
        inset: 0;
        z-index: -1;
        background-image: inherit;
        background-size: cover;
        filter: blur(10px);
    }
}

.cols-center {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: auto;
    margin-bottom: auto;
    height: 100%;
}

@media (max-width: 600px) {
    .wp-block-columns {
        display: flex;
        flex-direction: column;
    }

    .wp-block-column.mobile-first {
        order: -1;
    }
}

.is-style-scarf-hr {
    border: none;
    height: 4rem;
    background: url('imgs/scarf.gif') center center no-repeat;
    background-size: contain;
}

/* Floating Sidebar Layout */
.has-sidebar-layout {
    position: relative;
}



.floating-sidebar {
    background-color: #f7f7f7;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-size: 0.85rem;
    margin: 2rem auto 0;
    /* max-width: 1200px; */
}

.floating-sidebar>* {
    margin-bottom: 0.8rem;
}

.floating-sidebar>*:last-child {
    margin-bottom: 0;
}

.floating-sidebar h3,
.floating-sidebar h4 {
    font-size: 1rem;
    margin-top: 0;
    margin-bottom: 0.5rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid #e0e0e0;
}

.floating-sidebar .wp-block-table-of-contents ul {
    padding-left: 1.2rem;
    margin: 0.5rem 0;
}

.floating-sidebar .wp-block-table-of-contents li {
    margin: 0.3rem 0;
}

.floating-sidebar .wp-block-latest-posts {
    padding-left: 0;
}

.floating-sidebar .wp-block-latest-posts li {
    margin-bottom: 0.75rem;
}

/* Mobile: sidebar stacked above content */
@media (max-width: 600px) {
    .floating-sidebar {
        position: relative;
        margin-left: var(--wp--style--root--padding-left);
        margin-right: var(--wp--style--root--padding-right);
        padding-right: var(--wp--style--root--padding-right);
        padding-left: var(--wp--style--root--padding-left);
        margin: 0 0 2rem 0;
        order: -1;
    }
}

/* @media (min-width: 601px) and (max-width: 1178px) {
    main:has(.floating-sidebar) {
        border: red solid 1px;
    }
} */
@media (max-width: 1178px) {
    .floating-sidebar {
        margin-bottom: 1rem;
    }
}

/* Desktop: floating sidebar on the right */
@media (min-width: 1179px) {
    .floating-sidebar {
        top: 500px;
        position: absolute;
        /* position: fixed;
        top: 100px; */
        right: 20px;
        width: 250px;
        max-width: 280px;
        margin: 0;
        z-index: 100;
    }

    /* Ensure main content has enough right margin to not overlap with sidebar */
    .has-sidebar-layout .wp-block-post-content>* {
        margin-right: 300px;
    }

    /* But allow certain blocks to be full width */
    .has-sidebar-layout .wp-block-post-content>.wp-block-cover,
    .has-sidebar-layout .wp-block-post-content>.wp-block-group.alignfull,
    .has-sidebar-layout .wp-block-post-content>.wp-block-image.alignfull,
    .has-sidebar-layout .wp-block-post-content>.alignfull {
        margin-right: 0;
        margin-left: 0;
        width: 100vw;
        max-width: 100vw;
        position: relative;
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (min-width: 1200px) {
    .floating-sidebar {
        right: calc((100vw - 1200px) / 2 - 40px);
        width: 300px;
    }

    .has-sidebar-layout .wp-block-post-content>* {
        margin-right: 270px;
    }
}

.gcbForm {
    display: block;
    width: 100%;
    padding: .375rem .75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border-radius: .25rem;
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}



.gcbForm:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e");
}

.gcbForm[type=checkbox] {
    border-radius: .25em;
    float: left;
    /* margin-left: -1.5em; */
    width: 1em;
    height: 1em;
    margin-top: .25em;
    vertical-align: top;
    /* background-color: #fff; */
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    border: 1px solid rgba(0, 0, 0, .25);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    -webkit-print-color-adjust: exact;
    color-adjust: exact;
}
small {
    font-size: .6em
}

/* Table of Contents Styling */
/* .table-of-contents {
    background-color: var(--wp--preset--color--teal);
}

.table-of-contents h1,
.table-of-contents h2,
.table-of-contents h3,
.table-of-contents h4,
.table-of-contents h5,
.table-of-contents h6 {
    color: var(--wp--preset--color--white);
}

.toc-level-1 .toc-link,
.toc-level-2 .toc-link,
.toc-level-3 .toc-link,
.toc-level-4 .toc-link,
.toc-level-5 .toc-link,
.toc-level-6 .toc-link {

    color: var(--wp--preset--color--white);

    font-size: 1.125rem;
}

.table-of-contents h3 {
    font-size: 1.25rem;
}

.table-of-contents a:hover {
    text-decoration: none;
} */