/* Minimal, muted overrides on top of Bootstrap - no bright colors, no shadows/gradients. */
:root {
    --bs-primary: #3b3f45;
    --bs-primary-rgb: 59, 63, 69;
    --bs-body-bg: #fafafa;
    --bs-body-color: #26282b;
    --bs-border-color: #dcdcdc;
    --bs-link-color: #3b3f45;
    --bs-link-hover-color: #17181a;
}

.btn-primary {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: #26282b;
    border-color: #26282b;
}

.card, .navbar, .btn, .form-control, .form-select, .alert, .table,
.modal-content, .dropdown-menu {
    box-shadow: none !important;
    border-radius: 4px;
}

/* Dropdown menus (e.g. Mark contacted) styled to match the buttons that open them */
.dropdown-menu {
    padding: 0.25rem;
    min-width: 11rem;
}

.dropdown-item {
    font-size: 0.875rem;
    padding: 0.375rem 0.6rem;
    border-radius: 4px;
}

.dropdown-menu li + li {
    margin-top: 0.125rem;
}

.dropdown-item:hover,
.dropdown-item:focus,
.dropdown-item:active,
.dropdown-item.active {
    background-color: var(--bs-secondary);
    color: #fff;
}

/* Contact date modal: wider on desktop, capped on smaller screens */
.contact-date-modal {
    max-width: 300px;
}

@media (min-width: 992px) {
    .contact-date-modal {
        max-width: 600px;
    }
}

.navbar-brand {
    font-weight: 600;
}

a {
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.badge {
    font-weight: 500;
}

/* Gift card amount picker on the new-giveaway form: a row of selectable cards */
.gift-card-carousel {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
}

.gift-card-option {
    position: relative;
    flex: 0 0 auto;
    margin: 0;
}

.gift-card-option input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
}

.gift-card-option-label {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 90px;
    padding: 0.9rem 1rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 4px;
    background-color: #fff;
    font-weight: 600;
    cursor: pointer;
}

.gift-card-option input:checked + .gift-card-option-label {
    border-color: var(--bs-primary);
    background-color: var(--bs-primary);
    color: #fff;
}

.gift-card-option input:focus-visible + .gift-card-option-label {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

/* Left sidebar navigation */
.app-shell {
    display: flex;
    align-items: stretch;
    min-height: 100vh;
}

.sidebar {
    display: flex;
    flex-direction: column;
    flex: 0 0 220px;
    width: 220px;
    background-color: #fff;
    border-right: 1px solid var(--bs-border-color);
    padding: 1rem 0;
}

.sidebar-brand {
    display: block;
    padding: 0 1.25rem 1rem;
    font-weight: 600;
    color: var(--bs-body-color);
}

.sidebar-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1 1 auto;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 1.25rem;
    color: #55585d;
    text-decoration: none;
}

.sidebar-nav a:hover {
    background-color: #f1f1f1;
    color: var(--bs-body-color);
    text-decoration: none;
}

.sidebar-nav svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

.sidebar-nav-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.55rem 1.25rem;
    background: none;
    border: none;
    color: #55585d;
    text-align: left;
}

.sidebar-nav-toggle:hover {
    background-color: #f1f1f1;
    color: var(--bs-body-color);
}

.sidebar-nav-toggle svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

.sidebar-nav-toggle span {
    flex: 1 1 auto;
}

.sidebar-nav-chevron {
    width: 14px !important;
    height: 14px !important;
    flex: 0 0 14px !important;
    transition: transform 0.15s ease-in-out;
}

.sidebar-nav-toggle[aria-expanded="true"] .sidebar-nav-chevron {
    transform: rotate(180deg);
}

.sidebar-nav-group.open .sidebar-nav-toggle {
    color: var(--bs-body-color);
}

.sidebar-submenu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-submenu li {
    list-style: none;
}

.sidebar-submenu a {
    display: block;
    padding: 0.55rem 1.25rem 0.55rem 3.15rem;
    color: #55585d;
    text-decoration: none;
}

.sidebar-submenu a:hover,
.sidebar-submenu a:focus {
    background-color: #f1f1f1;
    color: var(--bs-body-color);
    text-decoration: none;
}

.sidebar-submenu a.active {
    background-color: #f1f1f1;
    color: var(--bs-body-color);
    font-weight: 600;
}

.sidebar-logout {
    padding: 0.75rem 1.25rem 0;
    border-top: 1px solid var(--bs-border-color);
    margin-top: 0.5rem;
}

.sidebar-logout button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.55rem 0;
    background: none;
    border: none;
    color: #55585d;
    font-size: 0.95rem;
}

.sidebar-logout button:hover {
    color: var(--bs-body-color);
}

.sidebar-logout svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

.content-area {
    flex: 1 1 auto;
    min-width: 0;
}

.content-area > main {
    padding-top: 2rem;
}

@media (max-width: 767.98px) {
    .app-shell {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        flex: 0 0 auto;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        border-right: none;
        border-bottom: 1px solid var(--bs-border-color);
        padding: 0.5rem 1rem;
    }

    .sidebar-brand {
        padding: 0.25rem 0.75rem 0.25rem 0;
    }

    .sidebar-nav {
        display: flex;
        flex-wrap: wrap;
        flex: 1 1 auto;
    }

    .sidebar-nav a {
        padding: 0.4rem 0.6rem;
    }

    .sidebar-nav a span {
        display: none;
    }

    .sidebar-nav-toggle {
        width: auto;
        padding: 0.4rem 0.6rem;
    }

    .sidebar-nav-toggle span {
        display: none;
    }

    .sidebar-nav-chevron {
        display: none;
    }

    .sidebar-nav-group {
        position: relative;
    }

    .sidebar-submenu {
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 20;
        min-width: 220px;
        background-color: #fff;
        border: 1px solid var(--bs-border-color);
        border-radius: 4px;
        padding: 0.25rem;
    }

    .sidebar-submenu a {
        padding: 0.45rem 0.6rem;
        border-radius: 4px;
    }

    .sidebar-logout {
        border-top: none;
        margin-top: 0;
        padding: 0;
    }

    .sidebar-logout button span {
        display: none;
    }

    .content-area > main {
        padding-top: 1.25rem;
    }
}
