/* --------- DRAWER --------- */
#drawer-toggle {
    display: none;
}

#drawer-overlay {
    display: none;
}

@media screen and (max-width: 768px) {
    #drawer-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        bottom: 1.5rem;
        right: 1.5rem;
        z-index: 1001;
        width: 2.8rem;
        height: 2.8rem;
        border-radius: 50%;
        border: 2px dashed #4c4c7c;
        background-color: rgba(255, 255, 255, 0.92);
        color: #4c4c7c;
        font-size: 1.2rem;
        cursor: pointer;
        box-shadow: 0 2px 8px rgba(76, 76, 124, 0.25);
        transition: background-color 0.2s ease;
    }

    #drawer-toggle:hover {
        background-color: #4c4c7c;
        color: white;
    }

    #drawer-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background-color: rgba(0, 0, 0, 0.35);
        z-index: 999;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }

    #drawer-overlay.drawer-overlay-visible {
        opacity: 1;
        pointer-events: auto;
    }

    #right-column {
        position: fixed;
        top: 0;
        right: 0;
        height: 100dvh;
        width: 85vw;
        max-width: 360px;
        overflow-y: auto;
        z-index: 1000;
        background-color: rgba(255, 255, 255, 0.97);
        transform: translateX(100%);
        transition: transform 0.3s ease;
        padding: 1rem 1rem 3rem 1rem;
        border-left: 1px dashed #4c4c7c;
    }

    #right-column > section {
        background-color: rgba(171, 171, 242, 0.2);
    }

    #right-column.drawer-open {
        transform: translateX(0);
    }
}

@media screen and (max-width: 768px) {
    nav {
        width: 90vw;
        padding: 0;
    }

    nav a {
        font-size: 1rem;
        padding: 0.4rem 0.8rem;
    }

    nav a img {
        display: none;
    }

    section {
        margin: 0 auto;
        padding: 1rem;
    }

    h2 {
        font-size: 1.6rem;
    }

    .media-cover  {
        width: 20vw;
    }

    .divider {
        margin: 1rem 0;
    }

    .container {
        width: 90vw;
    }

    .data-entry {
        flex-direction: column;
        padding: 1rem;
        background-size: 100% 100%;
        min-height: 300px;
    }

    .media-card {
        gap: 14px;
        padding: 14px;
    }

    .media-card .media-card-cover {
        width: 80px;
        height: 120px;
    }

    .media-card .media-card-title {
        font-size: 1.25rem;
    }

    .data-entry > div > img {
        width: 30vw;
        padding: 0.5rem;
    }

    .data-entry .info {
        width: unset;
        padding-left: 0.5rem;
    }

    .data-entry > .info > div {
        display: inline-flex;;
    }

    .data-entry > div > .tag-list {
        justify-content: center;
    }

    .data-entry h3 {
        font-size: 1.8rem;
        line-height: 1.1;
        margin-bottom: 0.6rem;
        margin-top: 0.6rem;
    }

    .data-entry h4 {
        /*font-size: 1.4rem;*/
        line-height: 1.1;
        margin-bottom: 0.4rem;
        margin-top: 0.4rem;
    }

    .data-entry h5 {
        font-size: 0.9rem;
        line-height: 1.2;
        margin-bottom: 0.3rem;
        margin-top: 0.3rem;
    }

    .flex-grid-container {
        display:grid;
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 0.5rem;
        align-items: center;
        justify-items: center;
    }

    #notes {
        display: inline-flex;
        margin-top: 0.5rem;
    }

    .polish-image {
        width: 80px;
        height: 80px;
    }

    .progress-stats {
        font-size: 0.9rem;
    }

    .progress-bar {
        height: 15px;
    }

    #left-column {
        width: 90vw;
    }

    #right-column {
        width: 85vw;
    }

    .right-column-container {
        margin: 1rem 0 0 0;
    }

    .right-column-container:last-child {
        margin-bottom: 0.5rem;
    }

    .row {
        flex-direction: column-reverse;
        align-items: center;
    }

    .row > * {
        margin-bottom: 1rem;
    }

    .row.index-container {
        flex-direction: column;
    }

    .small {
        width: 30vw !important;
    }

    #star-container {
        flex-direction: column;
    }

    #tracker-links > li {
        margin: 0.4rem 0;
    }
}
