﻿/* =========================================================
   InovaSkin — Clean theme (compact chat + red-only palette)
   Place AFTER Bootstrap & styles.css
   ========================================================= */
:root {
    /* Brand */
    --red-500: #D32F2F; /* primary action */
    --red-600: #C62828; /* brand */
    --red-700: #B71C1C; /* brand dark */
    --red-050: #FFEBEE; /* very light red (bg) */
    --red-100: #FFCDD2; /* light red (focus/hover) */
    --red-200: #F8D7DA; /* soft red (chips/badges) */
    /* Neutrals */
    --gray-900: #111111;
    --gray-800: #2E2E2E;
    --gray-600: #6B7280;
    --gray-200: #e5e7eb;
    --gray-100: #F8FAFC;
    /* Buttons (neutral helpers) */
    --btn-black: var(--gray-900);
    --btn-white: #ffffff;
    --btn-border: var(--gray-200);
    /* Chat sizing */
    --chat-max-ch: 38ch;
    --chat-pad: .18rem .42rem;
    --chat-font: .80rem;
    --chat-line: 1.25;
    /* Replace Bootstrap “warning” yellow globally */
    --bs-warning: #dc3545;
    --bs-warning-rgb: 220, 53, 69;
    --bs-nav-pills-link-active-bg: #dc3545 !important;
    --bs-nav-pills-link-active-color: #fff !important;
    --bs-nav-pills-border-radius: .375rem;
}

/* ---------------- Base & typography ---------------- */
html, body {
    height: 100%;
}

body {
    color: var(--gray-800);
    background-color: #FAFBFC;
    padding-top: 40px;
}

a {
    color: var(--red-600);
    text-decoration: none;
}

    a:hover, a:focus {
        color: var(--red-700);
        text-decoration: underline;
    }

    /* brand, not yellow */
    .text-warning, a.text-warning {
        color: var(--red-600) !important;
    }

        a.text-warning:hover {
            color: var(--red-700) !important;
        }

img {
    image-rendering: auto;
    max-width: 100%;
    height: auto;
}

/* ---------------- Hero spacing + animation ---------------- */
header.masthead, .hero, .banner {
    position: relative;
    margin-top: 90px;
    padding-top: 2rem;
    animation: fadeDown 1s ease-out forwards;
    opacity: 0;
}

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 991px) {
    body {
        padding-top: 70px;
    }

    header.masthead, .hero, .banner {
        margin-top: 70px;
        padding-top: 1.5rem;
    }
}

/* ---------------- Image helpers ---------------- */
.img-hero, .img-portrait, .card-img-top {
    display: block;
    object-fit: cover;
    object-position: center;
    border-radius: 1rem;
}

.img-hero {
    width: 100%;
    aspect-ratio: 16/9;
}

.img-portrait {
    width: 100%;
    aspect-ratio: 3/4;
}

.card-img-top {
    height: 240px;
}

.img-avatar {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

/* ---------------- Cards & headings ---------------- */
.card-title {
    color: #1F2937;
    letter-spacing: .2px;
    font-weight: 600;
}

.card .muted-label {
    color: var(--gray-600);
    font-weight: 600;
}

.card-accent-red {
    border-left: 5px solid var(--red-600);
}

.card-accent-soft {
    border-left: 5px solid var(--red-100);
}

/* ---------------- Forms ---------------- */
.form-control:focus,
input:focus, textarea:focus, select:focus {
    border-color: var(--red-600) !important;
    box-shadow: 0 0 0 0.2rem rgba(198,40,40,.25) !important;
    outline: none !important;
}

input.bg-dark:focus, textarea.bg-dark:focus {
    border-color: var(--red-100) !important;
    box-shadow: 0 0 0 0.2rem rgba(255,205,210,.35) !important;
}

.form-floating > label:focus,
.form-floating > .form-control:focus ~ label {
    color: var(--red-600) !important;
}

/* Checkboxes / radios */
.form-check-input {
    accent-color: var(--red-600);
}

    .form-check-input:checked {
        background-color: var(--red-600) !important;
        border-color: var(--red-600) !important;
    }

    .form-check-input:hover {
        border-color: var(--red-700) !important;
    }

    .form-check-input:focus {
        box-shadow: 0 0 0 0.2rem rgba(198,40,40,.25) !important;
        border-color: var(--red-600) !important;
    }

    .form-check-input:disabled {
        background-color: #f4dede !important;
        border-color: #e8baba !important;
        opacity: .7;
    }

/* ---------------- Buttons ---------------- */
.btn, .btn:focus {
    box-shadow: none !important;
    transition: background-color .25s ease, border-color .25s ease, color .25s ease;
}

.btn-primary {
    background-color: var(--red-600) !important;
    border-color: var(--red-600) !important;
    color: #fff !important;
}

    .btn-primary:hover {
        background-color: var(--red-700) !important;
        border-color: var(--red-700) !important;
    }

.btn-outline-primary {
    border-color: var(--red-600) !important;
    color: var(--red-600) !important;
}

    .btn-outline-primary:hover {
        background-color: var(--red-600) !important;
        color: #fff !important;
    }

.btn-success, .btn-warning, .btn-info {
    background-color: var(--red-600) !important;
    border-color: var(--red-600) !important;
    color: #fff !important;
}

    .btn-success:hover, .btn-warning:hover, .btn-info:hover {
        background-color: var(--red-700) !important;
        border-color: var(--red-700) !important;
    }

.btn-outline-dark, .btn-outline-secondary {
    border-color: var(--btn-black) !important;
    color: var(--btn-black) !important;
}

    .btn-outline-dark:hover, .btn-outline-secondary:hover {
        background-color: var(--btn-black) !important;
        color: var(--btn-white) !important;
    }

.btn-light, .btn-white {
    background-color: var(--btn-white) !important;
    border-color: var(--btn-border) !important;
    color: #111 !important;
}

    .btn-light:hover, .btn-white:hover {
        background-color: #f8f9fa !important;
    }

.btn-xl {
    padding: .95rem 1.5rem;
    font-weight: 600;
}

/* ---------------- Chat (compact) ---------------- */
.chat-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 160px;
    overflow-y: auto;
    padding-right: 2px;
    scrollbar-gutter: stable;
}

.chat-item {
    display: flex;
    gap: .3rem;
    margin-bottom: .25rem;
    align-items: flex-end;
}

    .chat-item.me {
        justify-content: flex-end;
    }

    .chat-item.them {
        justify-content: flex-start;
    }

.chat-avatar {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font: 700 .6rem/1 'Poppins', sans-serif;
    color: #fff;
    background: var(--red-700);
    user-select: none;
}

.chat-bubble {
    display: inline-block;
    max-width: 44ch;
    padding: .18rem .45rem;
    border-radius: 8px;
    font-size: .8rem;
    line-height: 1.25;
    border: 1px solid #F2B8B8;
    background: #FFF1F2;
    color: #5A0000;
    box-shadow: 0 1px 2px rgba(0,0,0,.06);
    word-wrap: break-word;
    white-space: normal;
}

.chat-item.me .chat-bubble {
    background: var(--red-050);
    border-color: #F5B5B5;
    color: var(--red-700);
}

.chat-name {
    font-weight: 700;
    color: var(--red-700);
    font-size: .78rem;
    margin-right: .25rem;
    display: inline;
}

.chat-text {
    display: inline;
}

.chat-time {
    display: block;
    font-size: .7rem;
    color: #777;
    text-align: right;
    margin-top: .05rem;
}

/* ---------------- Calendar event banners ---------------- */
#progress-calendar .fc {
    font-family: 'Poppins', sans-serif;
    font-size: .86rem;
    background-color: #fff;
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,.06);
    padding: 1rem;
}

#progress-calendar .fc-toolbar-title {
    color: var(--red-700);
    font-weight: 600;
    font-size: 1rem;
}

#progress-calendar .fc .fc-daygrid-event {
    font-size: 0.74rem !important;
    line-height: 1.15 !important;
    padding: 2px 4px !important;
    border-radius: 6px !important;
    white-space: normal !important;
    word-break: break-word !important;
    overflow: visible !important;
}

#progress-calendar .fc-event-main {
    overflow: visible !important;
    white-space: normal !important;
    display: block !important;
}

#progress-calendar .fc .fc-daygrid-day-number {
    font-size: .8rem !important;
}

#progress-calendar .fc-popover {
    font-size: .75rem !important;
    max-width: 280px !important;
}

/* ---------------- Photo entry fixes ---------------- */
.journal-photo-thumb, #photoPreview img,
.photo-entry img, .upload-preview img,
.fc-event .fc-event-main img {
    display: inline-block;
    width: 72px !important;
    height: 72px !important;
    object-fit: cover !important;
    border-radius: 6px !important;
    margin: 2px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

.fc-event .fc-event-main img {
    vertical-align: text-bottom;
    margin-right: 4px !important;
}

/* ---------------- Provider Calendar Fix (no yellow flash) ---------------- */
#provider-calendar .fc {
    --fc-today-bg-color: transparent !important;
}

#provider-calendar .fc-daygrid-day.fc-day-today .fc-daygrid-day-frame,
#provider-calendar .fc-timegrid-col.fc-day-today,
#provider-calendar .fc-theme-standard td.fc-day-today,
#provider-calendar .fc-theme-standard .fc-scrollgrid .fc-day-today {
    background-color: transparent !important;
}

#provider-calendar .fc .fc-button:focus,
#provider-calendar .fc .fc-button-primary:focus {
    box-shadow: none !important;
}

/* ---------------- Nav-pills & patient mini nav ---------------- */
.nav.nav-pills .nav-link.active,
.nav.nav-pills .show > .nav-link {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: #fff !important;
    box-shadow: none !important;
}

.nav.nav-pills .nav-link:focus,
.nav.nav-pills .nav-link:active {
    box-shadow: none !important;
    outline: none !important;
}

.patient-mini-nav {
    flex-wrap: wrap;
    gap: .4rem .5rem;
    font-size: .8rem;
}

    .patient-mini-nav .nav-link {
        background-color: #fff !important;
        border: 1px solid var(--red-600) !important;
        color: var(--red-600) !important;
        border-radius: .5rem;
        font-weight: 600;
        line-height: 1.2;
        padding: .4rem .6rem;
        box-shadow: none !important;
    }

        .patient-mini-nav .nav-link:hover,
        .patient-mini-nav .nav-link:focus,
        .patient-mini-nav .nav-link.active,
        .patient-mini-nav .show > .nav-link {
            background-color: var(--red-600) !important;
            border-color: var(--red-600) !important;
            color: #fff !important;
        }


/* =========================================================
   InovaSkin — FullCalendar Red Palette (Readable Contrast)
   ========================================================= */

/* Base layout & hover */
#progress-calendar .fc .fc-daygrid-event {
    border-radius: 6px !important;
    font-size: 0.8rem !important;
    font-weight: 500 !important; /* no bold */
    padding: 2px 6px !important;
    line-height: 1.3;
    color: #4A0000 !important; /* deep red text for all */
    border-width: 1px !important;
    border-style: solid !important;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

    #progress-calendar .fc .fc-daygrid-event:hover {
        transform: scale(1.02);
        cursor: pointer;
    }

/* --- Distinct red families per type --- */

/* Journal entries — soft rose tint */
.evt-journal {
    background-color: #FFCDD2 !important; /* red-100 */
    border-color: #E57373 !important; /* medium red border */
    color: #5A0000 !important;
}

/* Photo entries — vibrant red */
.evt-photo {
    background-color: #EF9A9A !important; /* warm coral red */
    border-color: #E53935 !important;
    color: #4A0000 !important;
}

/* Treatment plan updates — deep brick red */
.evt-plan {
    background-color: #E57373 !important; /* mid red */
    border-color: #C62828 !important;
    color: #3B0000 !important;
}

/* Appointments — darker accent red */
.evt-appt {
    background-color: #C62828 !important; /* strong red tone */
    border-color: #8E0000 !important;
    color: #fff !important; /* white only here for contrast */
}

/* Today highlight — subtle blush background */
#progress-calendar .fc-day-today {
    background-color: #FFEBEE !important;
    border: 1px solid #FFCDD2 !important;
}

/* Toolbar */
#progress-calendar .fc-toolbar-title {
    color: #B71C1C !important;
    font-weight: 600 !important;
}

#progress-calendar .fc .fc-button-primary {
    background-color: #C62828 !important;
    border-color: #B71C1C !important;
    color: #fff !important;
}

    #progress-calendar .fc .fc-button-primary:hover {
        background-color: #B71C1C !important;
    }

/* Legend badges (to match) */
.legend-journal {
    background: #FFCDD2;
}

.legend-photo {
    background: #EF9A9A;
}

.legend-plan {
    background: #E57373;
}

.legend-appt {
    background: #C62828;
}
/* Red-accent left border cards */
.card-accent-red {
    border-left: 5px solid #C62828; /* strong brand red */
    border-radius: 0.75rem;
    background-color: #fff;
}

/* Softer red accent for secondary sections */
.card-accent-soft {
    border-left: 5px solid #FFCDD2; /* light blush red */
    border-radius: 0.75rem;
    background-color: #fff;
}

/* Section headers */
.section-head {
    color: #C62828; /* deep red heading */
    font-weight: 600;
    letter-spacing: .2px;
    margin-bottom: .5rem;
}

/* Upcoming/past appt mini cards inside Appointments */
.appt-upcoming {
    border-left: 4px solid #C62828;
    background-color: #FFEBEE; /* very light red bg */
    border-radius: .5rem;
}

.appt-past {
    border-left: 4px solid #AFAFAF;
    background-color: #F8F8F8;
    border-radius: .5rem;
}

.appt-chip {
    display: inline-block;
    padding: .1rem .4rem;
    border-radius: 999px;
    font-size: .75rem;
    background: #FFEBEE;
    color: #B71C1C;
    border: 1px solid #F5B5B5;
}

.appt-when {
    font-weight: 600;
    color: #B71C1C;
}

.appt-with {
    color: #5C0000;
    font-size: .9rem;
}

/* =======================================
   HERO LOGO — full image, perfect scale
   ======================================= */
.hero-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--red-050, #FFEBEE);
    border-radius: 16px;
    padding: 1rem;
    overflow: visible; /* show the full image */
    min-height: 180px;
    text-align: center;
}

/* precise sizing for the logo */
.hero-logo {
    width: auto;
    height: auto;
    max-width: 300px; /* ⬅️ you can tweak this number */
    max-height: 180px; /* ⬅️ adjust this if it’s still tall */
    object-fit: contain;
    object-position: center;
    display: block;
}
/* Hero container */
.hero-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #FFEBEE; /* or var(--red-050) if defined */
    border-radius: 16px;
    padding: 12px;
    overflow: visible; /* don't clip the image */
    min-height: 180px; /* gives it some presence */
}

/* Logo sizing: fully visible, scaled down */
.hero-logo {
    max-height: 180px; /* tweak 160–240px to taste */
    max-width: 90%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* Neutralize old “force” classes if they exist anywhere */
.force-rect,
.not-avatar {
    height: auto !important;
    width: auto !important;
    object-fit: contain !important;
    overflow: visible !important;
}
/* ============================
   HERO BANNER (fixed container)
   ============================ */
.hero-banner {
    width: 100%;
    height: 260px; /* banner height */
    background-color: #FFEBEE; /* matches brand red-light */
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 12px;
    overflow: hidden; /* ensures logo stays inside */
    position: relative;
}

/* The logo fits *inside* without cropping */
.hero-banner-logo {
    width: auto;
    height: 100%; /* fill banner height */
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}
/* ============================================
   Patient top pill nav — brand deep red
   ============================================ */

.patient-top-nav .nav-link,
.patient-top-nav .btn {
    border-radius: 999px;
    border: 2px solid #8E1515;
    color: #8E1515;
    background-color: #ffffff;
    font-weight: 600;
    padding: 0.4rem 1.1rem;
}

    /* Active/selected tab */
    .patient-top-nav .nav-link.active,
    .patient-top-nav .btn.active {
        background-color: #8E1515;
        color: #ffffff !important;
        border-color: #8E1515;
    }

    /* Hover states */
    .patient-top-nav .nav-link:hover,
    .patient-top-nav .btn:hover {
        background-color: #FBE9E9;
        color: #8E1515;
        border-color: #8E1515;
    }

    /* Optional: keep focus outlines neat */
    .patient-top-nav .nav-link:focus,
    .patient-top-nav .btn:focus {
        box-shadow: 0 0 0 0.15rem rgba(142, 21, 21, 0.25);
    }
/* ===================================
   Patient mini-nav pills (InovaSkin)
   =================================== */

.patient-mini-nav {
    flex-wrap: wrap;
    gap: .4rem .5rem;
    font-size: .8rem;
    margin-left: 0;
    padding-left: 0;
}

    /* Base (inactive) pills */
    .patient-mini-nav .nav-link {
        background-color: #fff !important;
        border: 1px solid #8E1515 !important; /* logo red */
        color: #8E1515 !important;
        border-radius: .4rem;
        padding: .35rem .75rem;
        font-weight: 600;
        font-size: .9rem;
        line-height: 1.2;
        box-shadow: none !important;
        transition: all .2s ease-in-out;
    }

        /* Hover */
        .patient-mini-nav .nav-link:hover,
        .patient-mini-nav .nav-link:focus {
            background-color: #8E1515 !important; /* deep red on hover */
            border-color: #8E1515 !important;
            color: #fff !important;
            text-decoration: none !important;
        }

        /* Active (selected) — muted red tone */
        .patient-mini-nav .nav-link.active,
        .patient-mini-nav .show > .nav-link,
        .patient-mini-nav.nav-pills .nav-link.active,
        .nav-pills.patient-mini-nav .nav-link.active {
            background-color: #8E1515 !important; /* muted version of logo red */
            border-color: #8E1515 !important;
            color: #fff !important;
        }
/* ===============================
   Navbar brand — Garamond + clean hover
   =============================== */
.navbar-brand {
    font-family: Garamond, serif !important;
    font-weight: 700;
    font-size: 1.9rem;
    letter-spacing: 0.5px;
    color: #fff !important;
    text-decoration: none !important; /* remove underline */
    transition: color 0.2s ease-in-out;
}

    .navbar-brand:hover,
    .navbar-brand:focus {
        color: #FBE9E9 !important; /* light red hover */
        text-decoration: none !important; /* prevent underline */
    }
    /* Lock InovaSkin brand color for all states */
    .navbar-brand,
    .navbar-brand:hover,
    .navbar-brand:focus,
    .navbar-brand:active,
    .navbar-brand:visited {
        font-family: Garamond, serif !important;
        font-weight: 700;
        font-size: 1.9rem;
        letter-spacing: 0.5px;
        color: #ffffff !important; /* same color always */
        text-decoration: none !important; /* no underline ever */
    }
/* =========================================
   InovaSkin navbar brand – lock everything
   ========================================= */
a.navbar-brand,
a.navbar-brand:link,
a.navbar-brand:visited,
a.navbar-brand:hover,
a.navbar-brand:active,
a.navbar-brand:focus {
    font-family: Garamond, serif !important;
    font-weight: 700;
    font-size: 1.9rem;
    letter-spacing: 0.5px;
    color: #ffffff !important; /* ALWAYS white */
    text-decoration: none !important; /* NEVER underlined */
    background-color: transparent !important;
}

html, body {
    background-color: #FAFBFC;
    color: #333;
    margin: 0;
    font-family: Garamond, serif;
    display: flex;
    flex-direction: column;
    /* stop any fade/animation on load */
    transition: none !important;
    animation: none !important;
}

/* extra safety: no transitions on the navbar or its children */
#mainNav,
#mainNav * {
    transition: none !important;
    animation: none !important;
}
/* Hard-disable slow transitions on provider mini-nav */
.nav-sm .nav-link,
.nav-sm .nav-link.nav-link-outline-red,
.nav-sm .nav-link.active {
    transition: none !important;
}
/* =======================
   HABP / Science figures
   ======================= */

/* Outer gray figure container */
.fig-img-box {
    position: relative !important;
    background-color: #f8f9fa !important;
    border: 1px solid rgba(0,0,0,.05) !important;
    border-radius: 1rem !important;
    padding: 0.75rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important; /* keep image INSIDE the box */
}



/* =======================
   HABP / Science figures
   ======================= */

/* All figure images on the science page */
.hbp-fig-img {
    display: block !important;
    margin: 0 auto !important;
    max-width: 100% !important;
    max-height: 360px !important; /* overall size control */
    height: auto !important;
    border-radius: 0.75rem !important;
}


/* Figure container (if not already styled) */
.fig-img-box {
    position: relative !important;
    background-color: #f8f9fa !important;
    border: 1px solid rgba(0,0,0,.05) !important;
    border-radius: 1rem !important;
    padding: 0.75rem !important;
    width: 100% !important;
    text-align: center !important;
    overflow: hidden !important;
}
/* ---------------- Avatar utilities ---------------- */

/* Large circular avatar image (patient profile on patient dashboard) */
.img-avatar-lg {
    width: 150px;
    height: 150px;
    object-fit: cover;
}

/* Large initials-only avatar (150x150) */
.avatar-initials-lg {
    width: 150px;
    height: 150px;
    line-height: 150px;
    border-radius: 50%;
    font-size: 50px;
    font-weight: 700;
    text-align: center;
    user-select: none;
    color: #ffffff;
}

/* 80px avatar image (patient list / cards) */
.avatar-80 {
    width: 80px;
    height: 80px;
    object-fit: cover;
}

/* 80px initials avatar */
.avatar-80-initials {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    user-select: none;
}

/* 120px avatar image (provider patient details header) */
.avatar-120 {
    width: 120px;
    height: 120px;
    object-fit: cover;
}

/* 120px initials avatar */
.avatar-120-initials {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    user-select: none;
}
