/* 
    Copyright (c) 2024 Ezeokenwa Kenneth (AKA Newman)
    This code is part of a skill test for a job interview.
    Unauthorized copying, distribution, or use of this code is strictly prohibited.
    All rights reserved.
*/

/* Base Styles and Typography */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&display=swap');

/* ========== Base Styles ========== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Manrope', sans-serif;
}

body {
    background: #F6F7F8 0% 0% no-repeat padding-box;
    color: #707070;
    font-size: 14px;
    max-width: 1600px;
}

main {
    width: 100%;
    padding: 18px;
}

/* Utility Classes */
.bold {
    font-weight: bold;
    color: #072635;
}

.title {
    font-size: 24px;
    color: #072635;
    font-weight: 800px;
    margin-bottom: 40px;
}

.show-more {
    padding: 11px 40px;
    border: 0;
    border-radius: 41px;
    background-color: #01F0D0;
    color: #072635;
    font-weight: bold;
    cursor: pointer;
    display: block;
    margin: 30px auto;
    transition: all 0.3s ease;
}

.show-more:hover {
    background-color: #00d6b9;
    color: #ffffff;
    transform: scale(1.05);
}

/* Layout Components */
.container {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 20px;
    margin: 25px 0;
}

/* Common Card Styles */
.grid-container,
.patient-area,
.diag-list,
.details,
.diagnos,
.lab {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 18px;
}

/* Navigation Bar */
.navbar {
    position: relative;
    width: 100%;
    height: 72px;
    display: flex;
    background: #FFFFFF;
    border-radius: 70px;
    opacity: 1;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0px 3px 10px rgba(114, 110, 110, 0.1);
}

.dropdown_menu {
    max-height: 0;
    position: fixed;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    left: 65%;
    width: 35%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    z-index: 1000;
    transition: max-height 0.3s ease;
}

.logo-area {
    margin: 12px 32px;
}

.nav-mid {
    display: flex;
    justify-content: center;
    align-items: center;
}

.icon {
    padding-right: 6px;
}

.nav-mid a {
    font-weight: bold;
    justify-content: center;
    letter-spacing: 0;
    color: #072635;
    border-radius: 41px;
    text-decoration: none;
    padding: 10px 20px;
    margin: 0 5px;
    transition: background-color 0.5s ease;
    flex-wrap: nowrap;
}

.nav-mid a:hover {
    background-color: #D8FCF7;
}

.nav-mid .links.active {
    background-color: #01F0D0;
}

.toggle_btn {
    color: #000000;
    font-size: 25px;
    cursor: pointer;
    display: none;
}

/* Profile Area */
.profile-area {
    display: flex;
    margin: 12px 20px;
    text-align: center;
    justify-content: center;
    align-items: center;
}

.pic {
    margin-right: 8px;
    cursor: pointer;
}

.prof {
    margin-left: 25px;
    cursor: pointer;
}

#prof {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.desc {
    display: flex;
    flex-direction: column;
    text-align: left;
}

/* Patient Section */
.patient-area {
    grid-column: 1;
    grid-row: 1/10;
    overflow-y: auto;
    scrollbar-width: thin;
}

.patient-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.patient-title .search {
    margin-bottom: 40px;
}

.patient-list {
    overflow-y: scroll;
    max-height: 940px;
    padding: 5px;
}

.patient-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.patient-list-item.active,
.patient-list-item:hover {
    background-color: #D8FCF7;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(1, 240, 208, 0.2);
    transform: translateY(-2px);
}

#patient-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

#patient-item li {
    display: flex;
    flex-direction: column;
    text-align: left;
    list-style: none;
}

#patient-item div .bold {
    margin-bottom: 5px;
}

/* Diagnosis Section */
.diagnos {
    grid-column: 2;
    grid-row: 1/7;
    padding: 18px 15px;
    color: #072635;
}

.diag-list {
    grid-column: 2;
    grid-row: 7/10;
    max-height: 100%;
}

/* Patient Details Section */
.details {
    grid-column: 3;
    grid-row: 1/9;
}

.profile-desc {
    margin-bottom: 25px;
}

.profile-picture {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.profile-picture img {
    margin-bottom: 24px;
    margin-top: 30px;
}

.profile-details {
    display: flex;
    margin-bottom: 24px;
}

.profile-details img {
    margin-right: 16px;
}

/* Laboratory Results Section */
.lab {
    grid-column: 3;
}

.lab2 {
    max-height: 180px;
    overflow-y: auto;
}

.lab-details {
    display: flex;
    justify-content: space-between;
    padding: 16px 11px;
}

.lab-details:hover {
    background-color: #F6F7F8;
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
}

.table {
    max-height: 250px;
    overflow-y: scroll;
}

thead {
    background-color: #F6F7F8;
    overflow: hidden;
}

th {
    text-align: left;
    color: #072635;
    padding: 12px 20px;
}

th:first-child {
    border-top-left-radius: 24px;
    border-bottom-left-radius: 24px;
}

th:last-child {
    border-top-right-radius: 24px;
    border-bottom-right-radius: 24px;
}

tr th {
    border: 0;
}

th, td {
    padding: 10px 20px;
}

/* Blood Pressure Chart Section */
.blood-pressure-chart {
    background-color: #f8f9ff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    width: 100%;
    overflow: hidden;
    height: 298px;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.chart-header h3 {
    font-size: 18px;
    font-weight: bold;
}

.time-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    margin-right: 25px;
    color: #666;
}

.dropdown-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
}

.blood-pressure-content {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.chart-container {
    height: 220px;
    width: 60%;
    flex: 1;
}

.chart-legend {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 30%;
    min-width: 150px;
    max-height: 200px;
}

.legend-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    padding-left: 15px;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-bottom: 5px;
}

.legend-color.systolic {
    background-color: #ff6384;
}

.legend-color.diastolic {
    background-color: #8a7fff;
}

.legend-label {
    font-size: 14px;
    color: #666;
}

.legend-value {
    font-size: 22px;
    font-weight: bold;
    letter-spacing: 0;
}

.status {
    font-size: 12px;
}

.status.higher {
    color: #ff6384;
}

.status.lower {
    color: #8a7fff;
}

/* Health Metrics Cards */
.card2 {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
}

.card2a,
.card2b,
.card2c {
    flex: 1;
    border-radius: 12px;
    padding: 16px;
    height: 242px;
    margin-top: 20px;
}

.card2a {
    background-color: #E0F3FA;
}

.card2a img,
.card2b img,
.card2c img {
    margin-bottom: 16px;
}

.card2a h2,
.card2b h2,
.card2c h2 {
    padding: 5px 0;
    margin-bottom: 17px;
}

.card2b {
    background-color: #FFE6E9;
}

.card2c {
    background-color: #FFE6F1;
}

/* Custom Scrollbar Styling */
*::-webkit-scrollbar {
    width: 8px;
}

*::-webkit-scrollbar-track {
    background: transparent;
}

*::-webkit-scrollbar-thumb {
    background: #b9b8b8;
    border-radius: 10px;
}

*::-webkit-scrollbar-thumb:hover {
    background: #636262;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .nav-mid {
        display: none;
    }

    #prof {
        display: flex;
        position: absolute;
        right: 80px;
    }

    .toggle_btn {
        display: block;
    }

    .dropdown_menu.open {
        display: block;
        max-height: 200px;
        top: 80px;
        opacity: 1;
        transform: translateY(0);
        visibility: visible;
    }

    .dropdown_menu li {
        list-style: none;
        display: flex;
        color: #072635;
        align-items: center;
        justify-content: center;
        width: 100%;
        font-weight: 600;
        font-size: 12pt;
        transition: color 0.3s ease;
    }

    .dropdown_menu li a {
        text-decoration: none;
        display: flex;
        width: 100%;
        padding: 0.8rem;
        align-items: center;
        justify-content: center;
        color: #072635;
    }

    .dropdown_menu li .links.active {
        background-color: #01F0D0;
    }

    .nav-mid,
    .prof {
        display: none;
    }

    .toggle_btn {
        display: block;
        margin-right: 20px;
    }

    .navbar {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 80px;
        padding-right: 10px;
        margin: 0;
        border-radius: 0;
        z-index: 100000;
    }

    .container {
        display: flex;
        flex-direction: column;
    }

    .patient-area {
        position: fixed;
        top: 90px;
        left: 0;
        width: 30%;
    }

    .patient-list {
        overflow-y: scroll;
        max-height: 940px;
        scrollbar-width: none;
    }

    .patient-list::-webkit-scrollbar {
        display: none;
    }

    .pat-icon {
        display: none;
    }

    .diagnos,
    .details,
    .lab,
    .diag-list {
        position: relative;
        top: 50px;
        left: 30%;
        width: 70%;
        height: fit-content;
    }

    .lab {
        height: max-content;
    }
}

@media screen and (max-width: 768px) {
    .dropdown_menu {
        left: 0;
        width: 100%;
    }

    .desc {
        display: none;
    }

    #prof {
        right: 60px;
    }

    .patient-area {
        position: relative;
        top: 50px;
        left: 0;
        width: 100%;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }

    .diagnos,
    .details,
    .lab,
    .diag-list {
        width: 100%;
        height: fit-content;
        left: 0;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }

    .lab {
        margin-bottom: 20px;
    }

    .card2 {
        flex-direction: column;
    }

    .chart-legend {
        display: none;
    }

    .card2a,
    .card2b,
    .card2c {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .table::-webkit-scrollbar,
    .lab2::-webkit-scrollbar {
        display: none;
    }
}