* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.wrapper {
    padding: 1rem 1.5rem;
}

.create-outfits-section {
    max-width: 1000px;
    width: 100%;
    height: 100vh;
    display: flex;
    margin: 1rem auto;
    margin-bottom: 0rem;
}

.wardrobe-showcase,
.create-outfits-box {
    border: 1px solid #848484;
    width: 50%;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
}

#filter-buttons {
    padding-top: 1.3rem;
    gap: 0.7rem;
}

.grid-wrapper {
    flex: 1;
    margin: auto;
    overflow-y: scroll;
    scrollbar-width: none;
}

.grid-wrapper::-webkit-scrollbar {
    display: none;
}

.wardrobe-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(100px, 200px));
    gap: 1rem;
}

.clothing-image {
    height: 150px;
    cursor: pointer;
}

/* hide edit and delete controls in the create outfit page
   because this page is specifically for creating outfits*/
.item-controls,
.edit-wrapper:hover .edit-name-btn {
    display: none;
}

.outfit-canvas {
    flex: 1;
    width: 75%;
    position: relative;
    border: 1px dashed gray;
    margin: 1rem auto;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
}

#clear-canvas-btn {
    color: #000000;
    border: none;
    padding: 0.5rem 0.6rem;
    margin: 0.7rem;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.3rem;
}

.canvas-image-container {
    position: absolute;
    display: inline-block;
}

.canvas-image {
    display: block;
    max-width: 150px;
}

.canvas-delete-btn {
    display: none;
    position: absolute;
    top: 5%;
    right: 8%;
    margin-top: 5px;
    border: none;
    background: transparent;
    font-size: 1rem;
}

.canvas-image-container:hover .canvas-delete-btn {
    display: block;
}

.outfit-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.outfit-name {
    padding: 0.5rem 1rem;
    margin: 0.5rem 0;
    font-size: 1rem;
    margin-bottom: 0.8rem;
}

.control-buttons {
    position: relative;
}

#save-btn,
#assign-btn {
    padding: 0.6rem 1rem;
    color: white;
    background-color: black;
    cursor: pointer;
    text-decoration: none;
    border-radius: 0.25rem;
    border: 1px solid black;
    font-size: 1rem;
}

.modal {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.modal.show {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#calendarInput {
    flex: 1;
}

.assign-popup {
    position: absolute;
    bottom: 25px;
    background: #000000;
    color: #ffffff;
    padding: 0.8rem 1rem;
    border-radius: 6px;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(10px);
    z-index: 9999;
    font-weight: 500;
}

.assign-popup.show {
    opacity: 1;
    transform: translateY(0);
}

.wardrobe-showcase h2,
.create-outfits-box h2 {
    font-weight: 530;
}

@media(max-width: 650px) {
    .wrapper {
        padding: 1rem;
        margin-top: 1rem;
    }

    .create-outfits-section {
        flex-direction: column;
        margin: 0;
        height: 100%;
    }

    .wardrobe-showcase,
    .create-outfits-box {
        width: 100%;
        margin-bottom: 1rem;
        padding: 0;
        border: none;
    }

    .create-outfits-box {
        border-top: 1px solid rgb(158, 157, 157);
        margin-top: 2rem;
        padding-top: 1.5rem;
        height: auto;
    }

    .outfit-canvas {
        height: 450px;
        flex: none;
        width: 100%;
    }

    .grid-wrapper {
        max-height: 320px;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .grid-wrapper::-webkit-scrollbar {
        width: 8px;
    }

    .grid-wrapper::-webkit-scrollbar-thumb {
        background-color: rgba(0, 0, 0, 0.3);
        border-radius: 4px;
    }

    #save-btn,
    #assign-btn {
        font-size: 0.9rem;
    }
}