/* Two Families Now Brand Theme */

:root {
    --tfn-primary: #034A9B;
    --tfn-blue: #0075BC;
    --tfn-blue-light: #669FD5;
    --tfn-orange: #FEBD3B;
    --tfn-gold: #FAA41A;
    --tfn-gold-light: #FEBD3B;
    --tfn-white: #FFFFFF;
    --tfn-black: #000000;
    --tfn-font-heading: 'Montserrat', 'Arial Black', Arial, sans-serif;
    --tfn-font-body: 'Montserrat', Arial, sans-serif;
}

body {
    font-family: var(--tfn-font-body);
    color: var(--tfn-black);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--tfn-font-heading);
}

/* App Logo */
.app-logo .img-fluid {
    max-height: 90px;
    padding: 0 5px 0 5px;
}

.table > :not(caption) > * > * {
    box-shadow: none;
}

.table .form-control {
    background-color: #ffffff !important;
    border-width: 0.5px !important;
    border-bottom-color: #ccc !important;
}

.table .form-select {
    background-color: #ffffff !important;
    border-width: 0.5px !important;
    border-bottom-color: #ccc !important;
}

.table .btn-primary {
    background-color: var(--tfn-primary);
    border-color: var(--tfn-primary);
}

.table .btn-secondary {
    background-color: var(--tfn-orange);
    border-color: var(--tfn-orange);
}

.alert-dismissible .btn-close {
    z-index: 1;
}

.controls {
    z-index: 2000;
    padding-top: 15px;
    padding-bottom: 15px;
    margin-right: 10px;
}

.app-menu .nav-item {
    font-size: 0.9rem;
    padding-bottom: 0.5rem;
    white-space: nowrap;
}

.app-menu .nav-item a {
    border-radius: 4px;
    height: 3rem;
    display: flex;
    align-items: center;
    line-height: 3rem;
    padding-left: 1rem;
}

.app-menu .nav-item a.active {
    background-color: rgba(255,255,255,0.25);
    color: white;
}

.app-menu .nav-item a:hover {
    background-color: rgba(255,255,255,0.1);
    color: white;
}

.app-menu .nav-link .oi {
    width: 1.5rem;
    font-size: 1.1rem;
    vertical-align: text-top;
    top: -2px;
}

.navbar-toggler {
    background-color: rgba(255, 255, 255, 0.1);
    margin: .5rem;
}

div.app-moduleactions a.dropdown-toggle, div.app-moduleactions div.dropdown-menu {
    color: #000000;
}

.dropdown-menu span {
  mix-blend-mode: difference;
}

@media (max-width: 767.98px) {

    .app-menu {
        width: 100%;
    }
}

/* ── Language pill toggle ── */
.tfn-pill {
    position: relative;
    width: 56px;
    height: 30px;
    border-radius: 30px;
    background-color: var(--tfn-blue-light);
    transition: background-color 0.3s ease;
    cursor: pointer;
}

.tfn-pill-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.tfn-pill.es {
    background-color: #FEBD3B;
}

.tfn-pill.es .tfn-pill-thumb {
    transform: translateX(26px);
}

/* ── Global button hover effects ── */
.mud-button-root.mud-button-filled {
    transition: filter 0.2s ease;
}

.mud-button-root.mud-button-filled:hover {
    filter: brightness(0.9);
}

.mud-button-root.mud-button-outlined {
    transition: background-color 0.2s ease;
}

.mud-button-root.mud-button-outlined:hover {
    background-color: rgba(3, 74, 155, 0.08);
}

/* ── Course Access dialog buttons ── */
.tfn-dialog-actions {
    display: flex;
    gap: 12px;
    padding: 0 16px 16px;
    width: 100%;
}

.tfn-dialog-btn {
    flex: 1;
    border-radius:20px !important;
    text-transform: none !important;
    font-weight: 600 !important;
    letter-spacing: 0.3px !important;
}

@media (max-width: 599.98px) {
    .tfn-dialog-actions {
        flex-direction: column;
        gap: 10px;
    }

    .tfn-dialog-btn {
        flex: none;
        width: 100%;
    }
}

/* ── Login button: only visible on landing page ── */
.tfn-appbar-login {
    display: none !important;
}

body:has(.landing-page) .tfn-appbar-login {
    display: inline-flex !important;
}

/* ── Appbar logo ── */
.tfn-appbar-logo {
    height: 40px;
    display: block;
}

/* ── Appbar link wrapper ── */
.tfn-appbar-home {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

/* ── Mobile-responsive appbar ── */
@media (max-width: 599.98px) {
    .tfn-appbar-logo {
        height: 28px;
    }

    #tfn-lang-toggle {
        gap: 4px !important;
        margin-right: 6px !important;
    }

    #tfn-lang-toggle .tfn-lang-label {
        font-size: 0.7rem !important;
    }

    #tfn-lang-toggle .tfn-pill {
        width: 40px;
        height: 22px;
    }

    #tfn-lang-toggle .tfn-pill-thumb {
        width: 16px;
        height: 16px;
    }

    #tfn-lang-toggle .tfn-pill.es .tfn-pill-thumb {
        transform: translateX(18px);
    }

    .tfn-appbar-buynow {
        display: none !important;
    }

    .tfn-appbar-login {
        font-size: 0.6rem !important;
        min-width: auto !important;
        white-space: nowrap;
        letter-spacing: 0 !important;
        border-radius: 10px !important;
        flex-shrink: 0;
    }

    body:has(.tfn-pill.es) .tfn-appbar-login {
        padding: 6px 6px !important;
    }

    #tfn-lang-toggle {
        margin-left: 6px !important;
    }
}

@media (max-width: 767px) {
    .navbar {
        position: fixed;
        top: 60px;
        width: 100%;
    }

    .controls {
        height: 60px;
        position: fixed;
        top: 0px;
        width: 100%;
        background-color: var(--tfn-primary);
    }

    .controls-group {
        float: right;
        margin-right: 25px;
    }

    .content {
        position: relative;
        top: 60px;
    }
}

/* ── Sticky Footer ── */
.mud-main-content {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh !important;
}

.tfn-footer {
    background-color: #FFFFFF;
    margin-top: auto;
    width: 100%;
    position: relative;
    z-index: 1;
    box-shadow: 
  0px 6px 6px -3px rgba(0, 0, 0, 0.2), 0px 10px 14px 1px rgba(0, 0, 0, 0.14), 0px 4px 18px 3px rgba(0, 0, 0, 0.12);
}

/*.tfn-footer-accent {
    height: 4px;
    background: linear-gradient(90deg, var(--tfn-gold), var(--tfn-orange));
}*/

.tfn-footer-inner {
    padding: 28px 40px 12px;
}

.tfn-footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.tfn-footer-links {
    display: flex;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
}

.tfn-footer-link {
    display: inline-flex !important;
    align-items: center;
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
}

.tfn-footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.tfn-footer-developed {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--tfn-primary);
    white-space: nowrap;
}

.tfn-footer-logo {
    height: 42px;
    width: auto;
    display: block;
}

.tfn-footer-copyright {
    font-size: 0.75rem;
    color: var(--tfn-primary);
    text-align: center;
    margin-top: 20px;
    padding-top: 12px;
    border-top: 1px solid #E0E0E0;
}

@media (max-width: 599.98px) {
    .tfn-footer-inner {
        padding: 24px 20px 14px;
    }

    .tfn-footer-row {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }

    .tfn-footer-links {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }

    .tfn-footer-brand {
        justify-content: center;
    }

    .tfn-footer-logo {
        height: 32px;
    }

    .tfn-footer-copyright {
        margin-top: 16px;
        padding-top: 10px;
    }
}

/* ══════════════════════════════════════════════
   Pre-rendering: prevent layout shifts (CLS)
   ══════════════════════════════════════════════ */

/* Lock dimensions of key layout regions so the DOM
   keeps the same box model when WASM boots. */
.tfn-prerendering .mud-appbar {
    min-height: 64px;
}

.tfn-prerendering .mud-main-content {
    padding-top: 64px;
}

/* Disable pointer events on interactive-only controls
   so they are visible but inert during prerender. */
.tfn-prerendering #tfn-lang-toggle,
.tfn-prerendering .tfn-appbar-login,
.tfn-prerendering .tfn-appbar-buynow {
    pointer-events: none;
}

/* Smooth transition when interactive mode activates. */
.mud-layout {
    opacity: 1;
    transition: opacity 0.15s ease-in;
}
