html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #fcfcfc;
    color: #212529;
}

a {
    color: #2874f0;
}

a:hover {
    color: #1d5fc7;
}

.page-shell {
    flex: 1;
}

#content {
    padding-bottom: 3rem;
}

.debug-header {
    background-color: #8a1818 !important;
}

#main-header {
    background-color: #2874f0;
    color: #ffffff;
}

.header-shell {
    row-gap: 1rem;
}

.main-navbar {
    display: flex !important;
    align-items: center;
    padding-left: 0.25rem;
}

.navbar-brand {
    font-family: "Merienda One", cursive;
    font-size: 1.5rem;
}

.nav-links .nav-link {
    color: rgba(255, 255, 255, 0.88) !important;
    font-weight: 500;
}

.nav-links .nav-link.active,
.nav-links .nav-link:hover {
    color: #ffffff !important;
}

.active-school-pill {
    margin-left: 0.75rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.header-form-label {
    display: block;
    margin-bottom: 0.35rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.cart {
    position: relative;
}

.course-count[data-count]:after {
    position: absolute;
    top: -0.2rem;
    right: -0.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 0.3rem;
    border-radius: 999px;
    background: rgba(27, 26, 26, 0.9);
    color: #fcfcfc;
    font-size: 0.8rem;
    font-weight: 700;
    content: attr(data-count);
}

div.dropdown-menu.selected-courses.show {
    min-width: min(38rem, 92vw);
    max-height: 26rem;
    padding: 1rem;
    overflow-x: hidden;
    overflow-y: auto;
}

#header-course-cart {
    margin-bottom: 0.75rem;
}

#header-course-cart td,
#header-course-cart th {
    vertical-align: middle;
}

.empty-cart .alert {
    margin-bottom: 0;
}

#review-order {
    white-space: nowrap;
}

.footer-bg {
    background-color: #f5f5f5;
    border-top: 1px solid #e5e5e5;
}

.footer {
    margin-top: auto;
    padding: 1rem 0;
}

.footer-links,
.footer-social {
    gap: 1rem;
}

.footer a {
    text-decoration: none;
}

.footer-social a {
    color: #6c757d;
}

.footer-social a:hover {
    color: #2874f0;
}

#home-search-bar {
    font-size: calc(0.3rem + 2vmin);
}

#home-search-bar::placeholder {
    font-size: clamp(0.95rem, 0.85rem + 0.35vw, 1.05rem);
}

input.homepage-search {
    height: calc(1.5em + 2rem + 2px);
}

.border-2 {
    border-width: 2px !important;
}

td[colspan]:not([colspan="1"]) {
    text-align: center;
}

.remove-course {
    color: #a62700;
}

.remove-course:hover {
    color: #7f1d00;
    text-decoration: none;
}

.home-masthead {
    margin-top: 2rem;
}

.home-search-panel {
    padding: 1.5rem;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 0.75rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.04);
}

.home-summary {
    background: #f7fbff;
    border-color: #cfe0ff;
    color: #1f3f75;
}

.home-features {
    margin-top: 3rem;
}

.home-features .lead {
    color: #6c757d;
    font-size: 1rem;
}

.school-directory {
    margin-top: 3rem;
}

.school-directory summary {
    padding: 0.9rem 1rem;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 0.75rem;
    cursor: pointer;
    font-weight: 600;
    list-style: none;
}

.school-directory summary::-webkit-details-marker {
    display: none;
}

.school-directory[open] summary {
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
}

.school-directory-panel {
    padding: 1rem;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-top: 0;
    border-radius: 0 0 0.75rem 0.75rem;
}

.school-directory-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.school-directory-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0.9rem;
    background: #fafafa;
    border: 1px solid #e5e5e5;
    border-radius: 0.6rem;
    color: #212529;
    text-decoration: none;
}

.school-directory-link:hover {
    background: #eef5ff;
    border-color: #cfe0ff;
    color: #212529;
    text-decoration: none;
}

.school-directory-link.is-selected {
    background: #eef5ff;
    border-color: #2874f0;
}

.school-directory-link span {
    font-weight: 500;
}

.school-directory-link small {
    color: #6c757d;
}

.results-summary-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 0.75rem;
}

.results-summary-bar__query {
    font-weight: 600;
}

.hint {
    color: #6c757d;
}

.search-results-wrap {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 0.75rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.04);
}

.search-results-table {
    margin-bottom: 0;
    font-size: 0.94rem;
}

.search-results-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    border-top: 0;
    background: #f8f9fa;
    color: #6c757d;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.search-results-table tbody td {
    vertical-align: middle;
}

.search-results-table tbody tr:nth-child(even) {
    background: #fcfcfc;
}

.search-results-table tbody tr:hover {
    background: #f5f9ff;
}

.search-results-table .btn-primary {
    min-width: 6.4rem;
}

.search-results-table .table-secondary {
    background: #f8f9fa;
    color: #212529;
}

.page-notifications .course-cart,
.page-notifications #choose-notifications .card,
.page-notifications #email-form,
.page-notifications #text-form {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 0.75rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.04);
}

.page-notifications .course-cart {
    overflow: hidden;
}

.page-notifications #choose-notifications .card-header {
    background: #f8f9fa;
}

.page-notifications #email-form,
.page-notifications #text-form {
    margin-top: 1rem;
    padding: 1.25rem;
}

.page-notifications #pay-button,
.page-notifications #free-button {
    margin-top: 0.5rem;
}

@media (max-width: 1199.98px) {
    .school-directory-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .main-navbar {
        display: block !important;
    }

    .active-school-pill {
        display: inline-block;
        margin-top: 0.5rem;
        margin-left: 0;
    }

    .nav-links {
        padding-top: 0.75rem;
    }
}

@media (max-width: 767.98px) {
    #content {
        margin-top: 1rem;
    }

    .results-summary-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .school-directory-grid {
        grid-template-columns: 1fr;
    }

    .footer-links,
    .footer-social {
        justify-content: center;
    }

    div.dropdown-menu.selected-courses.show {
        min-width: calc(100vw - 1.4rem);
    }
}

@media (max-width: 575.98px) {
    #cart {
        margin-right: 0.5rem;
    }

    .dropdown-menu.selected-courses {
        margin-left: 0.5rem;
    }
}
