/* css files for all pages */


html {
    box-sizing: border-box;
    /* root font-size: min 14px, ideal 1.5vw, max 18px */
    font-size: clamp(14px, 1.5vw, 18px);
}

*,
*::before,
*::after {
    box-sizing: inherit;
}


body {
    font-family: 'Times New Roman', Times, serif;
    margin: 0;
    padding: 0;
    text-align: center;
    background-color: white;
    font-size: 1rem;
    line-height: 1.5;
}


/* StyleSync Logo Header */
.logo-header {
    /* background-color: #f4f4f4; */
    background-color: white;
    /* padding: clamp(0.5rem, 2vw, 1rem); */
    font-size: clamp(1.25rem, 3vw, 2rem);
    font-weight: bold;
    /* box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1); */
    text-align: center;
    position: relative;
}


.logo {
    display: inline;
    font-size: clamp(2rem, 6vw, 4rem);
    font-weight: bold;
}


.logo-img {
    height: clamp(3rem, 10vw, 6rem);
    width: auto;
}


.outfit-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(0.25rem, 1vw, 0.75rem);
    margin-top: clamp(0.5rem, 2vw, 1rem);
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
}


.corner-button {
    position: fixed;
    padding: clamp(0.5rem, .75vw, 1rem) clamp(1rem, 3vw, 2rem);
    border: none;
    background-color: #06744b;
    color: white;
    font-size: clamp(0.75rem, 2vw, 1.125rem);
    cursor: pointer;
    border-radius: clamp(1rem, 2vw, 2rem);
}

.corner-button:hover {
    background-color: white;
    border: solid 2px #06744b;
    color: #06744b;
}


.top-left {
    top: clamp(4rem, 3vh, 6rem);
    left: clamp(1rem, 5vw, 2rem);
}

.top-right {
    top: clamp(4rem, 3vh, 6rem);
    right: clamp(1rem, 5vw, 2rem);
}

.bottom-left {
    bottom: clamp(1rem, 5vh, 2rem);
    left: clamp(1rem, 5vw, 2rem);
}

.bottom-right {
    bottom: clamp(1rem, 5vh, 2rem);
    right: clamp(1rem, 5vw, 2rem);
}

.top-right-middle {
    top: clamp(4rem, 3vh, 6rem);
    right: clamp(10rem, 12vw, 14rem);
}

.sidebar {
    position: fixed;
    top: 0;
    left: -250px;
    width: 250px;
    height: 100%;
    background: #444;
    color: white;
    padding-top: 20px;
    transition: 0.3s;
    z-index: 999;
}


.sidebar ul {
    list-style: none;
    padding: 0;
}


.sidebar ul li {
    padding: 15px;
    text-align: left;
}


.sidebar ul li a {
    color: white;
    text-decoration: none;
}


#close-menu {
    background: none;
    border: none;
    color: white;
    font-size: clamp(1.5rem, 4vw, 2rem);
    cursor: pointer;
    position: absolute;
    top: clamp(0.5rem, 2vw, 1rem);
    right: clamp(1rem, 3vw, 2rem);
}


/*category buttons during upload*/
.category-button {
    padding: clamp(0.25rem, 1vw, 0.75rem) clamp(0.5rem, 2vw, 1rem);
    margin: clamp(0.25rem, 1vw, 0.5rem);
    background-color: #f9f9f9;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
}

.category-button.active,
.category-button.selected {
    background-color: #444;
    /* pressed look */
    color: white;
    transform: translateY(2px);
    /* slight press-down effect */
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}


/* Overlay for Add Menu and Item Details */
.overlay {
    display: none;
    /* hidden by default */
    position: fixed;
    inset: 0;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.overlay.active {
    display: flex;
}

.overlay-content {
    background: white;
    position: relative;
    padding: clamp(1rem, 3vw, 2rem);
    border-radius: 10px;
    width: clamp(20rem, 80vw, 40rem);
    max-height: 90vh;
    /* limit the height */
    overflow-y: auto;
}

#close-view-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #ccc; /* light gray */
    color: #333;
    border: none;
    border-radius: 4px;
    font-size: 0.8rem;
    padding: 4px 8px;
    cursor: pointer;
    z-index: 10;
}

#close-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #ccc; /* light gray */
    color: #333;
    border: none;
    border-radius: 4px;
    font-size: 0.8rem;
    padding: 4px 8px;
    cursor: pointer;
    z-index: 10;
}

/* Menu for clothing details */
.context-menu {
    position: absolute;
    background: white;
    border: 1px solid #ccc;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: none;
}

.context-menu ul {
    list-style: none;
    padding: clamp(0.5rem, 1vw, 1rem);
    margin: 0;
}

.context-menu li {
    padding: clamp(0.5rem, 1vw, 1rem);
    cursor: pointer;
}

.context-menu li:hover {
    background: #f0f0f0;
}


.preview-images {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    gap: clamp(0.5rem, 1vw, 1rem);
}


#clothing-image {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    object-position: center;
}


.clothing-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    background-color: white;
}

img {
    -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none;   /* Android Chrome */
    user-select: none;
  }

/* filter button */
.tag-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    /* Center horizontally */
    align-items: center;
    /* Center vertically */
    gap: clamp(0.5rem, 1vw, 1rem);
    padding: clamp(0.5rem, 2vw, 1.5rem);
}

#filter-button.active-filters {
    border: 2px solid green;
}

.category-button {
    padding: clamp(0.5rem, 1vw, 1rem) clamp(1rem, 2vw, 2rem);
    margin: clamp(0.25rem, 1vw, 0.75rem);
    background-color: #f9f9f9;
    border: 1px solid #ccc;
    border-radius: clamp(0.25rem, 0.5vw, 0.75rem);
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
}

/* "Pressed" state for category buttons */
.category-button.selected {
    background-color: #ddd;
    border-color: #999;
    transform: translateY(2px);
}


.tag-button {
    padding: clamp(0.25rem, 1vw, 0.75rem) clamp(0.5rem, 2vw, 1rem);
    border: none;
    background: #ddd;
    border-radius: 20px;
    cursor: pointer;
    transition: 0.3s;
}

.tag-button.selected {
    background: #007BFF;
    color: white;
}


.filter-button-container {
    text-align: center;
    margin-top: clamp(1rem, 3vw, 2rem);
}


/* Saved outfits overlay*/
#outfit-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    z-index: 999;
}

#outfit-overlay.active {
    display: flex;
}


#outfit-overlay .overlay-content {
    background: white;
    padding: clamp(1rem, 2vw, 1.5rem);
    border-radius: 12px;
    width: clamp(20rem, 90vw, 37.5rem);
    text-align: center;
    overflow-y: auto;
}


#outfit-overlay img {
    max-width: clamp(5rem, 20vw, 10rem);
    max-height: clamp(5rem, 20vw, 10rem);
    object-fit: contain;
}

.container {
    margin-left: 50px;
    margin-right: 50px;
}

.instructions-container {
    border: solid 3px;
    border-radius: 15px;
    margin: 30px;
    padding-left: 30px;
    padding-right: 30px;
    border-color: #06744b;
    color: black;
}

.weather-panel {
    position: fixed;
    top: 150px;
    right: 41px;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    width: 250px;
    z-index: 1000;
    display: none;
}

.weather-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#close-weather {
    background: none;
    border: none;
    color: #333;
    font-size: 20px;
    cursor: pointer;
    position: absolute;
    top: 8px;
    right: 8px;
}

.logout-container {
    display: flex;
    justify-content: center;
    /* or 'space-between' if you want them to spread out */
    align-items: center;
    gap: 20px;
    /* add space between the two buttons */
}

.logout-button {
    margin: 0;
    /* remove default margin from h4 */
    border: solid 2px;
    padding: 5px;
    border-radius: 50px;
    padding-left: 20px;
    padding-right: 20px;
    background-color: #06744b;
    color: white;
}

.logout-button a {
    text-decoration: none;
    color: inherit;
}

.logout-button a:visited {
    color: inherit;
}

.logout-button:hover {
    background-color: white;
    border: 2px solid #06744b;
    color: #06744b;
    cursor: pointer;
}


/* styling profile picture and date created */
.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 30px;
}

.profile-picture-container {
    margin-bottom: 10px;
}

.profile-picture {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
}

.upload-form {
    margin-top: 10px;
    margin-bottom: 20px;
}

.joined-text {
    font-size: 16px;
    color: #666;
    margin-bottom: 10px;
}

.profile-name {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 10px;
}

.followers-container {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.followers,
.following {
    background-color: #ffb31c;
    padding: 5px 10px;
    border-radius: 20px;
    color: white;
    font-size: 14px;
}

.profile-email {
    font-size: 16px;
    margin-bottom: 5px;
}

.profile-bio {
    font-size: 16px;
    font-style: italic;
    color: #555;
}

.custom-upload-button {
    display: inline-block;
    background-color: #06744b;
    padding: 5px 10px;
    color: white;
    margin-top: 10px;
    font-size: 15px;
    cursor: pointer;
    border-radius: 30px;
}

.custom-upload-button:hover {
    background-color: #ffb31c;
}

#filter-button.active {
    background-color: #4CAF50;
    color: white;
    border: 2px solid #4CAF50;
}