/* Navigation bar with breadcrumbs and stats */
#sub-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 16px 0 16px;
    padding-bottom: 15px;
    width: calc(100% - 2 * 16px);
    height: 60px;
    border-bottom: 2px solid var(--dark-blue);
}
#sub-nav a {
    height: 70%;
}
#sub-nav img {
    height: 100%;
}
#sub-nav h2 {
    margin: 0;
    font-size: 2.8rem;
}
#sub-nav h2:last-of-type {
    margin-left: auto;
}
#sub-nav h2:last-of-type span:last-of-type {
    margin-left: 5px;
    font-size: 1.2rem;
}

/* Buttons for adding items and controlling page */
#buttons {
    margin: 20px 0 0 16px;
    display: flex;
    gap: 15px;
}
#buttons > div {
    padding: 10px 20px 10px 20px;
    width: max-content;
    border-radius: 8px;
    background-color: var(--dark-blue);
    color: white;
    cursor: pointer;
    font-size: 1.4rem;
}
#buttons>div:hover {
    font-weight: bold;
}

/*! Accordion */
/* Parent container for accordion items */
#accordion-container {
    display: flex;
    flex-direction: column;
    margin: 20px 16px 20px 16px;
    border: 1.5px solid #BFBFBF;
    border-radius: 8px;
    background-color: white;
    overflow: hidden;
}
/* Modular accordion-item */
.accordion-item {
    border-bottom: 2.5px solid #DEDEDE;
    overflow: hidden;
}
.accordion-item:first-child { border-radius: 8px 8px 0 0; }
.accordion-item:last-child {
    border-bottom: none;
    border-radius: 0 0 8px 8px;
}
/** Title element in accordion */
.accordion-item .title {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: var(--item-padding);
    font-size: 2.2rem;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
    cursor: pointer;
}
/** Caret (Arrows) */
.caret-container {
    display: flex;
    flex-direction: row;
    font-size: 1rem;
}
/** Remove icon */
.remove-icon {
    margin-left: auto;
    height: 25px;
}
.remove-icon:hover {
    opacity: 0.8;
}
/** Pane element in accordion */
.accordion-item .pane {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-height: 1px;
    padding: 0 var(--item-padding) 0 var(--item-padding);
    opacity: 0;
    font-size: 2rem;
}
/* Pane row */
.row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}
/** ACTIVE accordion settings */
.accordion-item.active { background-color: #F7F7F8; }
.accordion-item.active .caret-container { flex-direction: row-reverse; }
.accordion-item.active .title { font-weight: bold; }
.accordion-item.active .pane {
    max-height: 500px;
    padding: 10px var(--item-padding) var(--item-padding) var(--item-padding);
    opacity: 1;
}

/** Input colors */
.accordion-item .pane input {
    width: 80px;
    border-radius: 5px;
    color: black;
    text-align: center;
    font-size: 2rem;
    font-weight: bolder;
}
.accordion-item .pane input.sum { width: 100px; }
.kitchen input {
    border: 1px solid var(--kitchen-dark);
    background-color: var(--kitchen);
}
.living-room input {
    border: 1px solid var(--living-room-dark);
    background-color: var(--living-room);
}
.bedroom input {
    border: 1px solid var(--bedroom-dark);
    background-color: var(--bedroom);
}
.laundry input {
    border: 1px solid var(--laundry-dark);
    background-color: var(--laundry);
}
.bathroom input {
    border: 1px solid var(--bathroom-dark);
    background-color: var(--bathroom);
}
.study input {
    border: 1px solid var(--study-dark);
    background-color: var(--study);
}
/* Hiding arrows */
/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
/* Firefox */
input[type=number] {
    -moz-appearance: textfield;
}

/* Overlay container for adding items */
#item-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 5;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    backdrop-filter: blur(8px) brightness(50%);
    pointer-events: none;
    transition: opacity 0.2s;
}
#item-overlay.open {
    opacity: 1;
    backdrop-filter: blur(8px) brightness(50%);
    pointer-events: all;
}
/* White box overlay */
#item-overlay > div {
    margin: 20px;
    padding: 16px;
    min-width: 250px;
    width: auto;
    height: auto;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    box-shadow: 10px 10px 14px rgba(0, 0, 0, 0.15);
    background-color: white;
}
/* Header div */
#overlay-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 45px;
    border-bottom: 1px solid var(--dark-blue);
}
/* Heading text and close button */
#overlay-header > h2 {
    margin: 0;
    font-size: 2rem;
}
#overlay-header > img {
    height: 60%;
    cursor: pointer;
}
#overlay-content {
    padding: 20px 0 20px 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
#overlay-content span {
    font-size: 1.8rem;
    cursor: pointer;
}
#overlay-content span:hover {
    font-weight: bold;
}

@media (max-width: 900px) {
    #sub-nav {
        height: auto;
        flex-direction: column;
        align-items: flex-start;
    }
    #sub-nav > a:first-of-type, #sub-nav > h2:first-of-type {
        display: none;
    }
    #sub-nav h2 {
        font-size: 2.5rem;
    }
    #sub-nav h2:last-of-type {
        margin-left: 0;
    }
}