body {
    font-family: "Figtree", sans-serif;
    font-optical-sizing: auto;
    background-color: #fafafa;
    margin: 0;
    padding: 0;
    color: #333;
    max-width: 100%;
}

.dash {
    background-color: #fafafa;
}

/* CSS backgrounds by @d__raptis (https://www.magicpattern.design/tools/css-backgrounds) */
.home {
    background-color: #fafafa;
    opacity: 1;
    background-image: linear-gradient(30deg, #eee9e6 12%, transparent 12.5%, transparent 87%, #eee9e6 87.5%, #eee9e6), linear-gradient(150deg, #eee9e6 12%, transparent 12.5%, transparent 87%, #eee9e6 87.5%, #eee9e6), linear-gradient(30deg, #eee9e6 12%, transparent 12.5%, transparent 87%, #eee9e6 87.5%, #eee9e6), linear-gradient(150deg, #eee9e6 12%, transparent 12.5%, transparent 87%, #eee9e6 87.5%, #eee9e6), linear-gradient(60deg, #eee9e677 25%, transparent 25.5%, transparent 75%, #eee9e677 75%, #eee9e677), linear-gradient(60deg, #eee9e677 25%, transparent 25.5%, transparent 75%, #eee9e677 75%, #eee9e677);
    background-size: 160px 280px;
    background-position:
        0 0,
        0 0,
        80px 140px,
        80px 140px,
        0 0,
        80px 140px;
}

h1.mainHeading,
h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    padding: 0px 20px 0px 20px;
}

/* DASHBOARD LAYOUT */
.dashboard-grid {
    display: grid;
    grid-auto-columns: 1fr;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 20px;
    padding: 20px;
    grid-template-areas:
        "quarterly-monitor quarterly-monitor action-panel"
        "budget-overview yearly-monitor yearly-monitor";
}

.quarterly-monitor {
    grid-area: quarterly-monitor;
}

.action-panel {
    grid-area: action-panel;
}

.budget-overview {
    grid-area: budget-overview;
}

.yearly-monitor {
    grid-area: yearly-monitor;
}

.box-contents,
#budget {
    box-sizing: border-box;
    border-radius: 4px;
    margin: 20px;
}

.box-contents {
    position: relative;
    background: #fff;
    padding: 20px;
}

/* NAVBAR */

.navbar {
    /* position: sticky;
    top: 0;
    z-index: 100; */
    padding: 30px 0px 30px 100px;
    display: flex;
    align-items: center;
    background-color: transparent; 
    position: sticky;
    overflow: hidden;
}

.navbar::before {
    content: "";
    position: absolute;
    inset: 0;
    background-color: #ffffff;
    opacity: 0.8;
    z-index: -1;
}

.navbar svg {
    height: 30px;
    margin-right: 30px;
    z-index: 1;
}

.navbar a {
    float: left;
    color: #000000;
    text-align: center;
    padding: 0px 20px;
    text-decoration: none;
    font-size: 14px;
    z-index: 1;
}

.navbar a:hover {
    color: #999;
}

.navbar a.active {
    font-weight: bold;
}

/* QUARTERLY MONITOR BUTTONS FOR EACH FACTOR */

#buttonBar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 20px;
    padding-left: 80px;
}

#buttonBar button {
    background-color: #f2f2f2;
    border: none;
    padding: 8px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    box-shadow: 1px 1px 2px 0px rgb(225, 225, 225);
    transition: 0.2s ease;
}

#buttonBar button.active,
#buttonBar button:hover {
    background-color: #333;
    color: #fff;
}

/* BUDGET MONTIOR */

#budget {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    text-align: center;
}

.card {
    flex: 1;
    min-width: 300px;
    background: #fff;
    border-radius: 4px;
    text-align: center;
    height: 150px;
    padding: 20px;
    transition: all 0.3s ease;
}

.card h2 {
    font-size: 14px;
    margin-bottom: 10px;
    justify-content: center;
}

.amount {
    font-size: 50px;
    font-weight: 800;
    margin: 10px 0;
    padding: 15px;
}

#facilitiesBudget .amount {
    color: #4CAF50;
}

#sickLeaveBudget .amount {
    color: #d63b39;
}

/* BUDGET HOVER STATE */
.card:hover {
    height: 250px;
}

.card:hover .hover-info {
    visibility: visible;
}

.card .see-more {
    color: #999;
    font-size: 12px;
    margin-top: 0px;
    cursor: pointer;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.card:hover .see-more {
    opacity: 0;
    pointer-events: none;
}

.hover-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    visibility: hidden;
}

.info-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.divider {
    width: 2px;
    height: 50px;
    background-color: #dfdfdf;
}

#facilitiesBudget .diff {
    font-weight: bold;
    color: #4CAF50;
    font-size: 20px;
    margin-bottom: 2px;
}

#sickLeaveBudget .diff {
    font-weight: bold;
    color: #d63b39;
    font-size: 20px;
    margin-bottom: 2px;
}

.caption {
    font-size: 14px;
    color: #333;
}


/* TOOL TIPS */

.info-icon {
    font-size: 16px;
    margin-left: 8px;
    cursor: pointer;
    color: #999;
    position: relative;
}

.info-icon .tooltiptext {
    visibility: hidden;
    width: 260px;
    background-color: #333;
    color: #fff;
    text-align: left;
    border-radius: 6px;
    padding: 10px;
    position: absolute;
    z-index: 10;
    bottom: 125%;
    left: 50%;
    margin-left: -130px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
}

.info-icon .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -16px;
    border-width: 6px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

.info-icon:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* NEXT QUARTER ACTION PANEL */

#suggestion-box {
    margin: 20px;
    padding: 0px;
    text-align: left;
}

#suggestion-box p {
    padding: 0px;
    text-align: left;
    font-weight: 300;
    font-size: 14px;
}

#suggestion-box strong {
    font-weight: 600;
}

#suggestion-box ul {
    list-style: none;
    padding: 0;
    margin-top: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* https://stackoverflow.com/questions/41959779/how-do-i-make-a-div-with-hover-stay-in-hover-state-on-click */
.suggestion-item {
    cursor: pointer;
    background: white;
    text-align: center;
    min-height: 80px;
    padding: 20px;
    border-radius: 4px;
    font-weight: 300;
    font-size: 14px;
    width: 100%;
    height: 100%;
    transition: white 0.3s ease;
    margin: 0;
    box-sizing: border-box;
}

.suggestion-item:hover {
    background: rgb(231, 226, 226);
    text-align: center;
    padding: 20px;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 14px;
    width: 100%;
    height: 100%;
    scale: 1.02;
    margin: 0;
    box-sizing: border-box;
}

.suggestion-item.checked {
    background: rgb(185, 224, 186);
    font-weight: 300;
    transition: all 0.3s ease;
    text-decoration: line-through;
    scale: 1.02;
    margin: 0;
    box-sizing: border-box;
}

.action-panel img {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-top: 0px;
    width: 7%;
}


/* HOME PAGE LAYOUT */

/* Top Page Section */
.topPage {
    display: grid;
    grid-template-columns: 60% 40%;
    padding: 20px 100px;
    gap: 0px;
}

.text-section {
    display: inline-block;
}

.text-section h1 {
    font-size: 40px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 20px;
}

.text-section strong {
    color: #497974;
    font-weight: 800;
}

.text-section p {
    font-size: 14px;
    width: 450px;
    line-height: 1.6;
    color: #555;
    background-color: transparent;
    padding: 40px;
    position: relative;
    z-index: -1;
}

.text-section p::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 4px;
    background-color: #ffffff;
    opacity: 0.8;
    z-index: -1;
}

/* Image of the dashboard */
.image-section img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0px 6px 20px rgba(0, 0, 0, 0.1);
    min-width: 320px;
}

/* Dashboard Button */
.midPage {
    display: block;
    padding: 20px 100px;
}

#dashboard-button {
    background-color: #497974;
    color: white;
    font-size: 30px;
    font-weight: 600;
    line-height: 1.2;
    padding: 20px 90px;
    display: block;
    text-align: center;
    text-decoration: none;
    width: fit-content;
    margin: 0px auto 20px;
    border-radius: 100px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

#dashboard-button:hover {
    background-color: #214843;
    transform: translateY(-2px);
    box-shadow: 0px 6px 14px rgba(0, 0, 0, 0.15);
}

/* Explore Subtitle */

#features-title {
    margin: 40px auto;
    display: block;
    width: fit-content;
    text-align: center;
    font-size: 20px;
    font-weight: 300;
}

/* Feature Section */
.bottomPage {
    display: grid;
    grid-auto-columns: 1fr 1fr;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 40px;
    padding: 0px 100px 60px 100px;
}

.feature {
    display: flex;
    flex-direction: column;
    height: auto;
    padding: 20px;
    text-align: center;
    border-radius: 4px;
    box-shadow: 0px 6px 20px rgba(0, 0, 0, 0.1);
    min-width: 320px;
    justify-content: center;
    background-color: #fafafa;
}

.feature p,
h2 {
    justify-content: center;
    padding: 0px 60px;
}

.feature p {
    font-size: 14px;
    font-weight: 300;
}

.img-feature {
    width: auto;
    height: auto;
    padding: 20px;
    text-align: center;
    min-width: 320px;
    position: relative;
    display: inline-block;
}

.img-feature img {
    max-width: 100%;
    height: auto;
    text-align: center;
    min-width: 100px;
    max-height: 320px;
}

#quarterly-feature .tooltip-container {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    cursor: pointer;
}

#action-feature .tooltip-container {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    cursor: pointer;
}

#budget-feature .tooltip-container {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    cursor: pointer;
}

#yearly-feature .tooltip-container {
    position: absolute;
    top: 20px;
    /* Adjust as needed */
    left: 49%;
    /* Adjust as needed */
    z-index: 2;
    cursor: pointer;
}

@keyframes wiggle {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(10deg);
    }

    50% {
        transform: rotate(-10deg);
    }

    75% {
        transform: rotate(5deg);
    }
}

.tooltip-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #497974;
    color: white;
    font-weight: 700;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    font-size: 20px;
    line-height: 1;
    animation: wiggle 1s ease-in-out infinite;
}

.tooltip-icon:hover {
    background-color: #888888;
}

/* Tooltip text styling */
.tooltip-text {
    visibility: hidden;
    width: 260px;
    background-color: #333;
    color: #fff;
    text-align: left;
    border-radius: 6px;
    padding: 10px;
    position: absolute;
    z-index: 10;
    bottom: 125%;
    left: 50%;
    margin-left: -130px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
}

.tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -16px;
    border-width: 6px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

/* showing tooltip on hover */
.tooltip-container:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

#bottomLogo {
    display: block;
    margin: -30px auto 20px auto;
    width: 5%;
}

/* SLIDER CAROUSEL */

.carousel {
    margin: 0 auto;
    padding: 20px 0;
    max-width: 100%;
    overflow: hidden;
    position: relative;
}

.sellgroup {
    display: flex;
    gap: 20px;
    width: max-content;
    animation: scroll 30s linear infinite;
}

.sell-img {
    height: 150px;
}

.sellpoint {
    width: 400px;
    color: #333;
    background-color: white;
    border-radius: 4px;
    padding: 20px;
    font-size: xx-large;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}


@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Pause on hover */
.carousel:hover .sellgroup {
    animation-play-state: paused;
}


.sell-info {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(73, 121, 116, 0.95);
    /* dark teal tint */
    color: white;
    font-size: 16px;
    padding: 20px;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    text-align: center;
    pointer-events: none;
}

.sellpoint:hover .sell-info {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* Summary panel */

#summaryWrapper {
    margin: 0px 10px;
}

#toggleSummaryBtn{
    font-family: "Figtree", sans-serif;
    padding: 10px 15px; 
    background-color: #eee; 
    border: none; 
    border-radius: 4px;
    cursor: pointer; 
    font-weight: 400;
}

#summaryPanel{
    display: none; 
    background: #fafafa; 
    padding: 10px 25px; 
    border-radius: 4px; 
    font-size: 14px;
}

#legend2 {
    width: 250px;
    position: absolute;
    z-index: 100;
    bottom: 420px;
    right: 15%;
}

/* BUTTON BAR FOR BUDGET */
#budgetBar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0px;
}

.budget-button-container {
    display: flex;
    gap: 10px;
    margin-bottom: 0px;
    flex-wrap: wrap;
}

.budget-button {
    padding: 10px 20px;
    font-family: "Figtree", sans-serif;
    background-color: #f2f2f2;
    border-style: none;
    color: #333;
    box-shadow: 1px 1px 2px 0px rgb(225, 225, 225);
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.budget-button:hover {
    background-color: #333;
    color: white;
}

.budget-button.active {
    background-color: #333;
    color: white;
}

.budget-button.active:hover {
    background-color: #333;
    color: white;
}