/* =========================================
   StudyFlashcards - Base Styles
   ========================================= */

html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--study-accent-soft, #efa1ca);
}

body {
    margin-bottom: 60px;
}

/* Default theme tokens. A future student theme can override these on body. */
:root {
    --study-text: #87234f;
    --study-accent: #d83c91;
    --study-accent-hover: #bd287a;
    --study-accent-soft: #efa1ca;
    --study-highlight: #fff0f7;
    --study-row-alt: #fff2f8;
    --study-border: #efb5d1;
}

/* =========================================
   StudyFlashcards - Soft Pink Navigation
   ========================================= */

.study-themed-navbar {
    --nav-text: var(--study-text);
    --nav-accent: var(--study-accent);
    --nav-highlight: var(--study-highlight);
}

    /* Brand, navigation links, welcome message, and logout */
    .study-themed-navbar .navbar-brand,
    .study-themed-navbar .navbar-text,
    .study-themed-navbar .navbar-nav .nav-link,
    .study-themed-navbar .navbar-nav .nav-link:visited,
    .study-themed-navbar .navbar-nav .nav-link.show,
    .study-themed-navbar .navbar-nav .nav-link.btn-link {
        color: var(--nav-text);
    }

        .study-themed-navbar .navbar-brand:hover,
        .study-themed-navbar .navbar-brand:focus,
        .study-themed-navbar .navbar-nav .nav-link:hover,
        .study-themed-navbar .navbar-nav .nav-link:focus {
            color: var(--nav-accent);
        }

        /* Active navigation items stay dark pink, including on hover/focus */
        .study-themed-navbar .navbar-nav .nav-link.active,
        .study-themed-navbar .navbar-nav .nav-link.active:hover,
        .study-themed-navbar .navbar-nav .nav-link.active:focus {
            color: var(--nav-text);
            background-color: var(--nav-highlight);
            border-radius: 6px;
        }

    /* Dropdown items */
    .study-themed-navbar .dropdown-item {
        color: var(--nav-text);
    }

        .study-themed-navbar .dropdown-item:hover,
        .study-themed-navbar .dropdown-item:focus {
            color: var(--nav-text);
            background-color: var(--nav-highlight);
        }

        .study-themed-navbar .dropdown-item.active {
            color: var(--nav-text);
            background-color: var(--nav-highlight);
        }

    /* Mobile menu button */
    .study-themed-navbar .navbar-toggler {
        border-color: var(--study-border);
    }

    .study-themed-navbar .navbar-toggler-icon {
        background-image: none;
        position: relative;
        width: 24px;
        height: 20px;
        border-top: 2px solid var(--nav-text);
        border-bottom: 2px solid var(--nav-text);
    }

        .study-themed-navbar .navbar-toggler-icon::after {
            content: "";
            position: absolute;
            left: 0;
            right: 0;
            top: 7px;
            border-top: 2px solid var(--nav-text);
        }

/* =========================================
   StudyFlashcards - Theme-aware Footer
   Bootstrap's .text-muted uses !important in some versions.
   ========================================= */
footer.footer.text-muted {
    color: var(--study-text) !important;
}

footer.footer a,
footer.footer a:visited {
    color: var(--study-text);
}

    footer.footer a:hover,
    footer.footer a:focus {
        color: var(--study-accent);
    }

/* =========================================
   Add Question and Review Questions
   Only applies to the Manage pages, not Study.
   ========================================= */
.study-manage-page {
    color: var(--study-text);
}

    .study-manage-page h1,
    .study-manage-page h2,
    .study-manage-page h3,
    .study-manage-page p,
    .study-manage-page .form-label {
        color: var(--study-text);
    }

    .study-manage-page .form-control {
        color: var(--study-text);
        border-color: var(--study-border);
        background-color: #fff;
    }

        .study-manage-page .form-control:focus {
            color: var(--study-text);
            border-color: var(--study-accent);
            box-shadow: 0 0 0 0.2rem var(--study-highlight);
        }

    .study-manage-page .btn-primary {
        --bs-btn-color: #fff;
        --bs-btn-bg: var(--study-accent);
        --bs-btn-border-color: var(--study-accent);
        --bs-btn-hover-color: #fff;
        --bs-btn-hover-bg: var(--study-accent-hover);
        --bs-btn-hover-border-color: var(--study-accent-hover);
        --bs-btn-focus-shadow-rgb: 216, 60, 145;
        --bs-btn-active-color: #fff;
        --bs-btn-active-bg: var(--study-accent-hover);
        --bs-btn-active-border-color: var(--study-accent-hover);
        --bs-btn-disabled-color: #fff;
        --bs-btn-disabled-bg: var(--study-accent);
        --bs-btn-disabled-border-color: var(--study-accent);
    }

    .study-manage-page .table {
        --bs-table-color: var(--study-text);
        --bs-table-bg: #fff;
        --bs-table-border-color: var(--study-border);
        --bs-table-striped-color: var(--study-text);
        --bs-table-striped-bg: var(--study-row-alt);
        --bs-table-hover-color: var(--study-text);
        --bs-table-hover-bg: var(--study-highlight);
    }

        .study-manage-page .table thead th {
            color: var(--study-text);
            background-color: var(--study-highlight);
        }


/* Deluxe home page illustration */
.deluxe-home {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    background-color: #fff0f6;
    overflow: hidden;
}

.deluxe-home-image {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 0;
}

/* Portrait phones: crop the sides to emphasize Deluxe and her cat */
@media (max-width: 767px) and (orientation: portrait) {
    .deluxe-home {
        height: auto;
        min-height: 0;
        padding: 0;
        overflow: hidden;
        justify-content: center;
    }

    .deluxe-home-image {
        width: 125%;
        max-width: none;
        height: auto;
        flex-shrink: 0;
        object-fit: contain;
        border-radius: 0;
    }
}

/* Landscape phones and larger screens: show full illustration */
@media (orientation: landscape) {
    .deluxe-home-image {
        object-fit: contain;
    }
}

/* Pink background throughout Deluxe's Home page */
body:has(.deluxe-home),
body:has(.deluxe-home) > .container,
body:has(.deluxe-home) main {
    background-color: #fff0f6 !important;
}

/* =========================================
   StudyFlashcards - Login and Registration
   ========================================= */
body:has(.study-auth-page) {
    background-color: var(--study-highlight);
}

.study-auth-page {
    display: flex;
    justify-content: center;
    padding: 2rem 0;
    color: var(--study-text);
}

.study-auth-card {
    width: 100%;
    max-width: 460px;
    padding: clamp(1.25rem, 4vw, 2rem);
    background-color: #fff;
    border: 1px solid var(--study-border);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(135, 35, 79, 0.08);
}

.study-auth-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 1.75rem;
    color: var(--study-text);
}

.study-auth-page .form-control,
.study-auth-page .form-select,
.study-auth-page .form-check-input {
    border-color: var(--study-border);
}

    .study-auth-page .form-control:focus,
    .study-auth-page .form-select:focus {
        border-color: var(--study-accent);
        box-shadow: 0 0 0 0.2rem var(--study-highlight);
    }

    .study-auth-page .form-check-input:checked {
        background-color: var(--study-accent-hover);
        border-color: var(--study-accent-hover);
    }

.study-auth-page .btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--study-accent-hover);
    --bs-btn-border-color: var(--study-accent-hover);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--study-text);
    --bs-btn-hover-border-color: var(--study-text);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--study-text);
    --bs-btn-active-border-color: var(--study-text);
    --bs-btn-focus-shadow-rgb: 189, 40, 122;
}

.study-auth-page .input-validation-error {
    border-color: var(--bs-danger, #dc3545);
}

.study-auth-page .validation-summary-valid {
    display: none;
}

.study-auth-page .validation-summary-errors {
    overflow-wrap: anywhere;
}

/* Authentication page primary buttons */
.study-auth-page .btn-primary {
    background-color: var(--study-accent-hover);
    border-color: var(--study-accent-hover);
    color: #fff;
}

    .study-auth-page .btn-primary:hover,
    .study-auth-page .btn-primary:focus,
    .study-auth-page .btn-primary:active {
        background-color: var(--study-text);
        border-color: var(--study-text);
        color: #fff;
    }