﻿.chapter-locator-block {
    margin: 50px 0;
    font-family: sourceSansPro, sans-serif;
    color: #000;
}

    .chapter-locator-block h2 {
        margin: 0 0 24px;
        font-family: martel, serif;
        font-size: 46px;
        line-height: 55px;
        text-transform: uppercase;
        color: #003745;
    }

    .chapter-locator-block > p {
        margin: 0 0 24px;
        font-size: 22px;
        line-height: 27px;
    }

.search-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 16px;
    margin-bottom: 24px;
}

    .search-controls > div {
        margin-bottom: 10px;
    }

@media (min-width: 768px) {
    .search-controls > div {
        margin-bottom: 0;
    }

    .search-controls .btn {
        width: auto;
    }
}

    .search-controls input[type="text"],
    .search-controls select {
        min-height: 52px;
        padding: 7px 16px;
        border: 4px solid #F2F2F2;
        background-color: #F2F2F2;
        color: #666;
        font-family: sourceSansPro, sans-serif;
        font-size: 22px;
        line-height: 26px;
        border-radius: 0;
        box-shadow: none;
    }

    .search-controls input[type="text"] {
        flex: 1 1 360px;
        min-width: 280px;
    }

    .search-controls select {
        flex: 0 0 150px;
    }

        .search-controls input[type="text"]:focus,
        .search-controls select:focus {
            outline: none;
            border-color: #009FC2;
            background-color: #fff;
            box-shadow: 0 0 0 2px rgba(0, 159, 194, 0.15);
        }

    .search-controls button {
        min-height: 52px;
        padding: 12px 20px;
        border: 1.5px solid #009FC2;
        background-color: #009FC2;
        color: #fff;
        font-family: sourceSansPro, sans-serif;
        font-weight: bold;
        font-size: 18px;
        line-height: 22px;
        text-transform: uppercase;
        border-radius: 0;
        box-shadow: none;
        transition: background-color 0.2s ease, border-color 0.2s ease;
    }

        .search-controls button:hover {
            background-color: #00758f;
            border-color: #00758f;
        }

.chapter-locator-layout {
    display: flex;
    flex-direction: row-reverse;
    align-items: stretch;
    gap: 30px;
    margin-top: 24px;
    position: relative;
}

.chapter-locator-map-column {
    flex: 1 1 auto;
    min-width: 0;
    position: relative;
}

.chapter-locator-map {
    width: 100%;
    min-height: 620px;
    border: 1.5px solid #F2F2F2;
    background-color: #fff;
}

.chapter-locator-status {
    margin-top: 16px;
    font-size: 22px;
    line-height: 27px;
    color: #003745;
}

.chapter-locator-side {
    width: 360px;
    flex: 0 0 360px;
    background-color: #F2F2F2;
    position: relative;
    transition: width 0.2s ease, flex-basis 0.2s ease;
}

.chapter-locator-side-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    background-color: #003745;
}

    .chapter-locator-side-header h3 {
        margin: 0;
        font-family: martel, serif;
        font-size: 27px;
        line-height: 32px;
        text-transform: uppercase;
        color: #fff;
    }

.chapter-locator-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1.5px solid #fff;
    background-color: #003745;
    color: #fff;
    cursor: pointer;
    border-radius: 0;
    font-size: 0 !important;
    line-height: 0 !important;
    overflow: hidden;
    white-space: nowrap;
    box-shadow: none;
}

    .chapter-locator-toggle-btn:hover {
        background-color: #009FC2;
        border-color: #009FC2;
        color: #fff;
    }

    .chapter-locator-toggle-btn:focus {
        outline: none;
        box-shadow: 0 0 0 2px rgba(255,255,255,0.25);
    }

.chapter-locator-toggle-icon {
    position: relative;
    display: block;
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
}

    .chapter-locator-toggle-icon::before,
    .chapter-locator-toggle-icon::after {
        content: "";
        position: absolute;
        left: 50%;
        top: 50%;
        background-color: currentColor;
        transform: translate(-50%, -50%);
    }

    .chapter-locator-toggle-icon::before {
        width: 14px;
        height: 2px;
    }

    .chapter-locator-toggle-icon::after {
        width: 2px;
        height: 14px;
        opacity: 0;
    }

.chapter-locator-layout.results-collapsed .chapter-locator-toggle-icon::after {
    opacity: 1;
}

.chapter-locator-results-panel {
    max-height: 620px;
    overflow-y: auto;
    background-color: #F2F2F2;
}

.chapter-locator-results {
    padding: 0;
}

    .chapter-locator-results > div {
        padding: 24px;
        border-top: 1.5px solid #fff;
        background-color: #F2F2F2;
    }

        .chapter-locator-results > div:first-child {
            border-top: 0;
        }

    .chapter-locator-results h4,
    .chapter-locator-results .chapter-name,
    .chapter-locator-results strong {
        margin: 0 0 8px;
        font-family: sourceSansPro, sans-serif;
        font-weight: bold;
        font-size: 20px;
        line-height: 29px;
        color: #003745;
    }

    .chapter-locator-results p {
        margin: 8px 0;
        font-size: 18px;
        line-height: 22px;
    }

    .chapter-locator-results a {
        color: #009FC2;
        text-decoration: none;
    }

        .chapter-locator-results a:hover {
            color: #00758f;
            text-decoration: underline;
        }

/* collapsed: hide strip and title, keep only floating icon button */
.chapter-locator-layout.results-collapsed .chapter-locator-side {
    width: 0;
    flex: 0 0 0;
    min-width: 0;
    overflow: visible;
    background: transparent;
}

.chapter-locator-layout.results-collapsed .chapter-locator-side-header {
    position: absolute;
    top: 20px;
    left: -64px;
    z-index: 20;
    width: 44px;
    height: 44px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

    .chapter-locator-layout.results-collapsed .chapter-locator-side-header h3 {
        display: none;
    }

.chapter-locator-layout.results-collapsed .chapter-locator-results-panel {
    display: none;
}

@media screen and (max-width: 991.98px) {
    .chapter-locator-layout {
        flex-direction: column;
    }

    .chapter-locator-side {
        width: 100%;
        flex: 0 0 auto;
    }

    .chapter-locator-map {
        min-height: 480px;
    }

    .chapter-locator-results-panel {
        max-height: none;
    }

    .chapter-locator-layout.results-collapsed .chapter-locator-side {
        width: 100%;
        flex: 0 0 auto;
    }

    .chapter-locator-layout.results-collapsed .chapter-locator-side-header {
        position: static;
        width: auto;
        height: auto;
        padding: 20px 24px;
        justify-content: flex-end;
        background-color: #003745;
    }
}

@media screen and (max-width: 767.98px) {
    .chapter-locator-block h2 {
        font-size: 36px;
        line-height: 43px;
    }

    .chapter-locator-block > p,
    .chapter-locator-status {
        font-size: 18px;
        line-height: 22px;
    }

    .search-controls {
        flex-direction: column;
        gap: 12px;
    }

        .search-controls input[type="text"],
        .search-controls select,
        .search-controls button {
            width: 100%;
        }

        .search-controls input[type="text"],
        .search-controls select {
            font-size: 18px;
            line-height: 22px;
        }

    .chapter-locator-side-header h3 {
        font-size: 24px;
        line-height: 28px;
    }
}
