/* -----------------------------
   Kaplan – Brand tokens
----------------------------- */

:root {
    --clr-KaplanBlue: #240F6E;
    --clr-KaplanGreen: #c1d82f;
    --clr-KaplanLighterGreen: #cdeb37;
    --clr-KaplanLightBlue: #005de8;
    --clr-KaplanLightBlueButtonBorder: rgba(0,93,232,.4);
    --clr-KaplanBackgroundLightBlue: #f3f7fd;
    --clr-Grey: #F0F0F0;
}

/* -----------------------------
   Global typography
----------------------------- */

html,
body {
    font-family: 'open sans', sans-serif;
    color: #1f1f1f;
    background-color: #ffffff;
    font-size: 15px;
    line-height: 22px;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, p, a {
    font-family: 'open sans', sans-serif !important;
}

h1, h2, h3, h4, h5 {
    font-weight: 400;
    color: var(--clr-KaplanBlue);
    margin-top: 0;
    text-transform: none;
    letter-spacing: normal;
}

h5 {
    font-size: 22px;
    font-weight: 600;
    line-height: 1.46;
}

/* Regular body copy */
p {
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Scoped list styling used in rich content blocks */
.details ul {
    padding-left: 1.5rem !important;
    list-style-type: disc !important;
    margin-block: 1rem;
}

.details ol {
    padding-left: 1.5rem !important;
    list-style-type: decimal !important;
    margin-block: 1rem;
}

/* -----------------------------
   Links & buttons
----------------------------- */

a,
button {
    font-family: 'open sans', sans-serif;
    letter-spacing: normal;
    font-weight: 400;
}

a,
.btn-link {
    color: var(--clr-KaplanLightBlue);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: none;
}

    a:hover,
    a:focus,
    .btn-link:hover,
    .btn-link:focus {
        color: var(--clr-KaplanBlue);
        text-decoration: underline;
    }

/* Button styles are defined in DNN_Style.css to match the old Kaplan site.
   BS5 CSS custom properties override DNN's padding, so we force 14px here. */

.btn,
.btn-txt {
    --bs-btn-padding-x: 0;
    --bs-btn-padding-y: 0;
    padding: 14px !important;
}

/* Generic focus ring */
.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.12rem #ffffff, 0 0 0 0.28rem var(--clr-KaplanLightBlue);
    outline: none;
}

/* -----------------------------
   Layout helpers
----------------------------- */

/* Match Bootstrap 4 container max-width (1140px) instead of BS5's 1320px */
.container {
    max-width: 1140px !important;
}

.content {
    padding-top: 2rem;
}

/* -----------------------------
   Forms & validation
----------------------------- */

.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--clr-KaplanGreen);
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
    font-size: 0.85rem;
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

form label {
    font-size: clamp(0.5rem, 2.5vw, 0.8rem);
}

.form-floating > .form-control,
.form-floating > .form-control-plaintext,
.form-floating > .form-select {
    font-size: clamp(1rem, 3.2vw, 1.5rem);
}

.form-floating > .form-select {
    padding-top: 0.6rem;
}

.rz-datepicker,
rz-inputtext {
    --rz-border-radius: 0.5rem;
    --rz-input-border-radius: 0.5rem;
}

/* -----------------------------
   Animation utilities
----------------------------- */

@keyframes fade-in-up {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

.animate-fade-in-up {
    animation: fade-in-up 0.8s ease-out forwards;
}

/* -----------------------------
   Text utilities
----------------------------- */

.truncate {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.line-clamp-2-style {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* -----------------------------
   Blazor error boundary
----------------------------- */

.blazor-error-boundary {
    background: var(--clr-KaplanBlue);
    padding: 1rem 1rem 1rem 3.7rem;
    color: #ffffff;
    position: relative;
}

    .blazor-error-boundary::before {
        content: "!";
        position: absolute;
        left: 1.2rem;
        top: 50%;
        transform: translateY(-50%);
        width: 1.9rem;
        height: 1.9rem;
        border-radius: 50%;
        border: 2px solid #ffffff;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.1rem;
    }

    .blazor-error-boundary::after {
        content: "An error has occurred.";
        font-family: 'open sans', sans-serif;
        text-transform: none;
        letter-spacing: 0;
    }

/* -----------------------------
   Brand imagery helpers
----------------------------- */

.brandimage {
    height: 40px;
}

.powerbyimage {
    height: 60px;
}

/* -----------------------------
   Radzen dialog tweaks
----------------------------- */

.rz-dialog .rz-dialog-content {
    padding-top: 0.75rem;
    padding-bottom: 1rem;
}

.rz-dialog .rz-dialog-titlebar {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e2e2e2;
    background-color: #ffffff;
    color: var(--clr-KaplanBlue);
    font-family: 'open sans', sans-serif;
}

/* -----------------------------
   Blazor reconnect modal
----------------------------- */

#components-reconnect-modal {
    display: none !important;
}


/* =========================================================
   OPPORTUNITY DETAILS – Kaplan styled
   ========================================================= */

.opp-wrapper {
    background: #ffffff;
}

/* --- HERO BAND --- */

.opp-hero {
    display: flex;
    position: relative;
    background: var(--clr-KaplanBlue);
    color: #ffffff;
    padding: 3rem 0 3.5rem;
    min-height: 300px;
    overflow: hidden;
    z-index: 0;
}

.opp-hero__inner {
    position: relative;
    z-index: 2;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.opp-hero__breadcrumb {
    margin: 0 0 0.6rem;
    font-size: 0.85rem;
}

    .opp-hero__breadcrumb a {
        color: #ffffff;
        text-decoration: none;
    }

        .opp-hero__breadcrumb a:hover,
        .opp-hero__breadcrumb a:focus {
            text-decoration: underline;
        }

.opp-hero__breadcrumb-sep {
    margin: 0 0.25rem;
}

.opp-hero__breadcrumb-current {
    color: var(--clr-KaplanGreen);
}

.opp-hero__label {
    font-family: 'open sans', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.85rem;
    color: var(--clr-KaplanGreen);
    margin-bottom: 0.5rem;
}

.opp-hero__title {
    font-family: 'open sans', sans-serif;
    font-weight: 300;
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    line-height: 1.15;
    margin: 0;
    color: #ffffff;
    text-transform: none;
    letter-spacing: normal;
}

.opp-hero__title--loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
}

.opp-title-spinner {
    width: 32px;
    height: 32px;
    display: block;
}

.opp-title-spinner__fallback {
    font-size: 0.9rem;
    color: #ffffff;
}

/* Hero triangles – subtle Kaplan accents */
.opp-hero__triangle-left,
.opp-hero__triangle-right {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 30%;
    pointer-events: none;
    z-index: 1;
}

.opp-hero__triangle-left {
    left: 0;
    background: var(--clr-KaplanGreen);
    opacity: 0.15;
    clip-path: polygon(0 60%, 0 100%, 50% 100%);
}

.opp-hero__triangle-right {
    right: 0;
    background: var(--clr-KaplanLightBlue);
    opacity: 0.15;
    clip-path: polygon(50% 0, 100% 0, 100% 40%);
}

/* --- JOB SUMMARY PANEL --- */

.opp-summary {
    background: #ffffff;
}

.opp-summary__inner {
    position: relative;
    z-index: 2;
    background: var(--clr-KaplanBackgroundLightBlue);
    border: 1px solid #e2e2e2;
    border-radius: 8px;
    margin: -2.5rem auto 0;
    padding: 2rem 2rem 2.5rem;
    color: #1f1f1f;
}

.opp-summary__heading {
    font-family: 'open sans', sans-serif;
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0 0 1.5rem;
    color: var(--clr-KaplanBlue);
    text-transform: none;
    letter-spacing: normal;
}

.opp-summary__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem 3rem;
}

.opp-summary__col {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.opp-summary__item {
    position: relative;
    display: flex;
    align-items: center;
}

    .opp-summary__item dt {
        font-family: 'open sans', sans-serif;
        font-size: 13px;
        font-weight: 600;
        color: var(--clr-KaplanBlue);
        margin-bottom: 0.1rem;
        text-transform: none;
        letter-spacing: normal;
    }

    .opp-summary__item dd {
        margin: 0;
        font-size: 14px;
        color: #555;
        margin-left: 0.5rem;
    }

.opp-subheading,
.opp-accordion__label {
    font-family: 'open sans', sans-serif;
    font-weight: 600;
}

.opp-subheading {
    letter-spacing: normal;
}

/* --- RESPONSIVE --- */

@media (max-width: 1024px) {
    .opp-hero {
        padding: 2rem 0 2.5rem;
        min-height: 200px;
    }

    .opp-summary__inner {
        margin-top: -2rem;
    }
}

@media (max-width: 640px) {
    .opp-hero {
        padding: 1.75rem 0 2rem;
        min-height: 160px;
    }

    .opp-hero__triangle-left,
    .opp-hero__triangle-right {
        width: 60%;
    }

    .opp-summary__inner {
        margin-top: 0;
        padding-inline: 1.25rem;
        border-radius: 0;
    }

    .opp-summary__grid {
        grid-template-columns: 1fr;
    }
}

/* (Kaplan details page uses its own DetailsKaplan component – no overrides needed) */

/* =========================================================
   Responsive filter grid (for HomeHeroSearch)
   ========================================================= */

@media (max-width: 900px) {
    .kap-filter__grid {
        grid-template-columns: 1fr 1fr !important;
    }
}

@media (max-width: 600px) {
    .kap-filter__grid {
        grid-template-columns: 1fr !important;
    }
}

/* =========================================================
   Related Vacancies – flip cards (from old DNN site)
   ========================================================= */

.image-flip:hover .backside,
.image-flip.hover .backside {
    transform: rotateY(0deg);
    border-radius: 0.25rem;
}

.image-flip:hover .frontside,
.image-flip.hover .frontside {
    transform: rotateY(180deg);
}

.mainflip {
    transition: all 1s ease 0s;
    transform-style: preserve-3d;
    position: relative;
}

.frontside {
    position: relative;
    transform: rotateY(0deg);
    z-index: 2;
    margin-bottom: 30px;
}

.backside {
    position: absolute;
    top: 0;
    left: 0;
    transform: rotateY(-180deg);
}

.frontside,
.backside {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transition: all 1s ease 0s;
    transform-style: preserve-3d;
    width: 100%;
}

.frontside .card,
.backside .card {
    min-height: 360px;
    cursor: pointer;
}

.frontside .card .card-footer,
.backside .card .card-footer {
    height: 50px;
}

.frontside .card .card-body ul li {
    font-weight: 600 !important;
    font-size: 12px !important;
}

.frontside .card .card-footer {
    font-size: 14px;
}

.circle-icon {
    border-radius: 50%;
    height: 40px;
    float: right;
    top: -26px;
    position: relative;
    width: 43px;
    text-align: center;
    padding-top: 10px;
}

/* =========================================================
   Sort dropdown (results grid)
   ========================================================= */

.kaplan-sort-btn {
    background-color: white !important;
    color: var(--clr-KaplanBlue) !important;
    border: 1px solid var(--clr-KaplanLightBlueButtonBorder) !important;
    box-shadow: none !important;
    font-size: 15px !important;
    font-weight: 600;
    display: inline-flex !important;
    align-items: center;
}

.kaplan-sort-btn:hover,
.kaplan-sort-btn:focus {
    background-color: #f9f9f9 !important;
}

.kaplan-sort-menu {
    border: 1px solid #e2e2e2;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-radius: 4px;
    padding: 0 !important;
}

.kaplan-sort-item {
    color: var(--clr-KaplanBlue) !important;
    font-size: 14px;
    padding: 12px 16px !important;
    border-bottom: 1px solid #f0f0f0;
}

.kaplan-sort-item:hover {
    background-color: var(--clr-KaplanBackgroundLightBlue) !important;
}

.kaplan-sort-item.active {
    background-color: var(--clr-KaplanBackgroundLightBlue) !important;
    font-weight: 600;
}

/* =========================================================
   Pagination (results grid)
   ========================================================= */

.pagination-touch {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
}

.pagination-touch .btn {
    min-width: 100px;
    font-size: 14px !important;
}

/* Ensure range slider inside form-control has proper height */
input[type="range"].form-control.slider {
    padding-top: 18px;
    padding-bottom: 0;
}

/* =========================================================
   CANDIDATE PROFILE DASHBOARD – Kaplan DNN-Style Overrides
   Wrapping class: .kaplan-dashboard
   Targets the CandidateProfileView component to match the
   old DNN Kaplan site layout (left sidebar card-nav,
   flat hero, Bootstrap card content area, green CTA).
   ========================================================= */

/* --- Overall background: white like old DNN site --- */
.kaplan-dashboard .candidate-profile {
    background-color: #ffffff !important;
}

/* --- HERO: compact, matching old DNN banner style --- */

/* Reduce hero padding to match old DNN compact banner */
.kaplan-dashboard .candidate-profile > div:nth-child(2) .relative.z-10 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.kaplan-dashboard .candidate-profile > div:nth-child(2) .flex.flex-col.items-center {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
}

/* Hide the dark tint overlay on hero background image */
.kaplan-dashboard .candidate-profile .relative.w-full.overflow-hidden > .absolute.inset-0:not(img) {
    display: none !important;
}

/* Hero text: dark (#110343) to match old DNN site */
.kaplan-dashboard .candidate-profile .relative.w-full.overflow-hidden {
    color: #110343 !important;
}

.kaplan-dashboard .candidate-profile h1.text-white,
.kaplan-dashboard .candidate-profile .relative.w-full.overflow-hidden h1 {
    color: #110343 !important;
}

.kaplan-dashboard .candidate-profile .relative.w-full.overflow-hidden p {
    color: #110343 !important;
    opacity: 1 !important;
}

/* Hero H1: Open Sans, not uppercase, lighter weight like old site */
.kaplan-dashboard .candidate-profile h1.Gilroy-Bold,
.kaplan-dashboard .candidate-profile h1 {
    color: #110343 !important;
    font-family: 'open sans', sans-serif !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    font-weight: 300 !important;
    font-size: clamp(1.8rem, 3.5vw, 2.8rem) !important;
}

/* --- MAIN CONTAINER: remove glass-morphism overlay --- */

/* Remove the overlapping negative margin (old site was flat) */
.kaplan-dashboard .candidate-profile main {
    margin-top: 0 !important;
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
}

/* Remove frosted-glass background, rounded corners, shadow */
.kaplan-dashboard .candidate-profile main > div {
    background-color: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* --- SIDEBAR: hide profile identity (old site didn't have it) --- */
.kaplan-dashboard .candidate-profile .flex.items-center.gap-3.px-3.pb-6.mb-2 {
    display: none !important;
}

/* --- SIDEBAR NAV: DNN card-style buttons --- */
.kaplan-dashboard .cp-nav {
    gap: 10px !important;
    padding: 0 10px !important;
}

.kaplan-dashboard .cp-nav-item {
    background-color: #fff !important;
    border: 1px solid var(--clr-KaplanLightBlueButtonBorder, rgba(0,93,232,.4)) !important;
    border-radius: 0.25em !important;
    box-shadow: 0 0 10px 0 rgba(2, 15, 85, 0.1) !important;
    color: var(--clr-KaplanLightBlue, #005de8) !important;
    height: 50px !important;
    line-height: 50px !important;
    justify-content: center !important;
    text-align: center !important;
    font-family: 'open sans', sans-serif !important;
    font-size: 15px !important;
    font-weight: 400 !important;
    padding: 0 0.875rem !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    transform: none !important;
}

.kaplan-dashboard .cp-nav-item:hover {
    background-color: #f9f9f9 !important;
    transform: none !important;
    box-shadow: 0 0 10px 0 rgba(2, 15, 85, 0.15) !important;
    color: var(--clr-KaplanLightBlue, #005de8) !important;
}

.kaplan-dashboard .cp-nav-item:active {
    background-color: #f0f0f0 !important;
    transform: none !important;
}

.kaplan-dashboard .cp-nav-item.cp-nav-active {
    background-color: var(--clr-KaplanGreen, #c1d82f) !important;
    color: black !important;
    border: none !important;
    box-shadow: none !important;
    font-weight: 500 !important;
}

.kaplan-dashboard .cp-nav-item.cp-nav-active:hover {
    background-color: var(--clr-KaplanGreen, #c1d82f) !important;
    color: black !important;
    transform: none !important;
    box-shadow: none !important;
}

.kaplan-dashboard .cp-nav-item.cp-nav-active:active {
    background-color: var(--clr-KaplanGreen, #c1d82f) !important;
    box-shadow: none !important;
}

/* Hide nav icons (old DNN site didn't have them) */
.kaplan-dashboard .cp-nav-icon {
    display: none !important;
}

/* --- SUMMARY CARDS: hide (old DNN site didn't have application stats) --- */
.kaplan-dashboard .space-y-8 > .grid.gap-6:first-child {
    display: none !important;
}

/* --- MAIN CONTENT CARD: Bootstrap card style matching old DNN --- */
.kaplan-dashboard section.rounded-xl {
    border-radius: 0 !important;
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2) !important;
    border: none !important;
    transition: 0.3s;
}

.kaplan-dashboard section.rounded-xl:hover {
    box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2) !important;
}

/* Section header bar */
.kaplan-dashboard section.rounded-xl > .flex.items-center.justify-between {
    border-bottom: 1px solid #e2e2e2 !important;
    padding: 1.25rem 1.5rem !important;
}

/* Section title: Kaplan Blue (only the header bar h2, not content h2s) */
.kaplan-dashboard section.rounded-xl > .flex.items-center.justify-between > h2 {
    font-family: 'open sans', sans-serif !important;
    color: var(--clr-KaplanBlue, #240F6E) !important;
    font-weight: 600 !important;
    font-size: 22px !important;
    line-height: 1.46 !important;
}

/* Section content padding */
.kaplan-dashboard section.rounded-xl > .px-4.pb-4.pt-2 {
    padding: 1.5rem !important;
}

/* --- SAVE BUTTON: Kaplan green CTA style --- */
.kaplan-dashboard section.rounded-xl > .flex.items-center.justify-between > button {
    background-color: var(--clr-KaplanLighterGreen, #cdeb37) !important;
    color: black !important;
    border: none !important;
    border-radius: 3px !important;
    box-shadow: 0 2px 0 0 rgba(0, 0, 0, 0.16) !important;
    font-family: 'open sans', sans-serif !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    padding: 10px 20px !important;
    transition: background-color 0.2s ease !important;
}

.kaplan-dashboard section.rounded-xl > .flex.items-center.justify-between > button:hover {
    background-color: var(--clr-KaplanGreen, #c1d82f) !important;
}

/* --- FORM STYLING: match old DNN form look --- */

/* Labels */
.kaplan-dashboard label {
    font-family: 'open sans', sans-serif !important;
    font-weight: 400;
}

/* Form inputs: taller, no rounded corners like old DNN */
.kaplan-dashboard .form-control,
.kaplan-dashboard input[type="text"],
.kaplan-dashboard input[type="email"],
.kaplan-dashboard input[type="tel"],
.kaplan-dashboard select {
    height: 46px;
    border-radius: 0;
    font-family: 'open sans', sans-serif;
}

/* --- RESPONSIVE: match old DNN mobile behaviour --- */
@media (max-width: 991px) {
    .kaplan-dashboard .cp-nav {
        padding: 0 !important;
    }
}

/* --- Remove extra spacing from Tailwind "space-y-8" when cards hidden --- */
.kaplan-dashboard .space-y-8 > *:first-child:not(section) + section {
    margin-top: 0 !important;
}
