table {
    border-collapse: collapse;
}

.wsite-white-border {
    border: 1px solid white;
}

td > img {
    width: 100%;
}

.image {
    width: 100px;
    height: 200px;
}

td {
    color: white;
    position: relative;
}

th.productTitle {
    font-size: x-large;
}

h3:not(.wsite-admin-panel), th:not(.wsite-admin-panel) {
    color: white;
    text-align: center;
}

h3.wsite-admin-panel, th.wsite-admin-panel {
    color: white;
}

.wsite-right-text {
    vertical-align: top;
    margin-left: 5px;
    text-align: center;
}

/* Small clickable thumbnail pictures at the bottom */
.filmstrip-for-sale {
    height: 100px;
    width: 100%;
    display: flex;
    flex-direction: column; /* Updated property */
    flex-wrap: wrap; /* Updated property */
    justify-content: start;
    align-items: flex-start; /* Align items to the left */
    overflow: hidden;
    overflow-x: auto;
    overflow-y: auto;
}

/* Each small thumbnail image */
.filmstrip-for-sale img, .filmstrip-for-sale span {
    display: flex;
    height: 100%;
    width: auto;
    margin-right: 6px;
    cursor: pointer;
}


@media screen and (min-width: 1024px) {
    .wsite-contact-button {
        float: right;
        border-radius: 5px;
    }
}


.overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    /* bring your own prefixes */
    transform: translate(-50%, -50%);
}

.popup {
    margin: 70px auto;
    padding: 20px;
    background: #444040;
    border-radius: 5px;
    width: 40%;
    position: relative;
    transition: all 5s ease-in-out;
}

.popup h2 {
    margin-top: -20px;
    color: white;
    font-family: Tahoma, Arial, sans-serif;
}

.popup .close {
    position: absolute;
    top: 5px;
    right: 22px;
    transition: all 200ms;
    font-size: 30px;
    font-weight: bold;
    text-decoration: none;
    color: white;
    cursor: pointer;
}

.popup .close:hover {
    color: #06D85F;
}

.popup .content {
    max-height: 30%;
    overflow: auto;
}

@media screen and (max-width: 1024px) {
    .box {
        width: 70%;
    }

    .popup {
        width: 100%;
    }

    .overlay {
        position: fixed;
        width: 80%;
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }
}

.contact-section-popup h1 {
    color: white;
}

.contact-section-popup .contact-form-text, input[type=email], input[type=submit], textarea {
    width: 100%;
    text-align: center;
    padding: 12px;
    border: 1px solid #767676;
    border-radius: 6px;
    box-sizing: border-box;
    margin-top: 6px;
    margin-bottom: 16px;
    resize: vertical;
}

textarea {
    height: 200px;
}

textarea.wsite-admin-textarea {
    height: 300px;
}

label.wsite-input-image-label {
    background-color: indigo;
    color: white;
    padding: 0.5rem;
    font-family: sans-serif;
    border-radius: 0.3rem;
    cursor: pointer;
    margin-top: 1rem;
}

.contact-section-popup input[type=text]:hover, input[type=email]:hover, input[type=submit]:hover, textarea:hover {
    background: lightgrey;
}

.wsite-product-title-input {
    width: 80%;
    height: 30px;
    text-align: center;
}

#incorrectFile .modal-red.modal-content, #incorrectFile .close, #noMainImage .modal-red.modal-content, #noMainImage .close {
    background-color: red;
    color: white;
}

#incorrectFile .modal-header, #noMainImage .modal-header {
    border-bottom: 0;
}

.wsite-uploaded-image {
    position: relative;
    display: inline-block;
}

img.wsite-uploaded-image:hover {
    opacity: 0.8;
}

span.trash-icon {
    height: 30px;
    width: 30px;
    background-color: white;
    position: absolute;
    top: 0;
    right: 0;
    cursor: pointer;
    color: black;
    border-radius: 15px;
}

i.trash-icon {
    position: absolute;
    top: 15px;
    right: 5px;
    cursor: pointer;
    color: black;
}

.upload-button {
    width: 99%;
    text-align: center;
    cursor: pointer;
}



.wsite-admin-table {
    width: 100%;
}

.wsite-for-sale-table i.fa-pen-to-square {
    margin-left: 10px;
    cursor: pointer;
}

.wsite-for-sale-table {
    height: 300px;
}

.content-container .wsite-for-sale-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); /* Adjust column width as needed */
    grid-template-rows: auto 1fr; /* Set the second row to take remaining height */
    margin-bottom: 20px;
    border-collapse: collapse;
    border: 1px solid white;
    border-radius: 25px;
}

.content-container .main-picture {
    align-self: start;
    max-width: 300px;
    margin: 0 auto;
}

.content-container .main-picture img {
    max-height: 360px; /* Ensure the main picture fits within its container */
    width: 100%;
    height: auto;
    display: flex;
    align-items: center; /* Vertically center the content within the column */
    justify-content: center;
    padding: 10px;
    margin: 0 auto;
}

@media screen and (min-width: 1024px) {
    .content-container .wsite-for-sale-grid-container:has(.small-pictures) .description {
        grid-column: 1/-1; /* Position .description on the right column */
        grid-row: 3; /* Occupy both rows */
        align-self: center; /* Vertically center the .description within the grid item */
        border-top: 1px solid white;
    }


    .content-container .wsite-for-sale-grid-container:not(:has(.small-pictures)) .description {
        grid-column: 2/3; /* Position .description on the right column */
        grid-row: 2/3; /* Occupy both rows */
        border-left: 1px solid white;
        padding: 10px;
    }
}

.edit-for-sale-icon {
    margin-left: 5px;
    cursor: pointer;
}

.for-sale-remove-icon {
    float: right;
    color: white;
    cursor: pointer;
    padding: 15px;
}

.content-container .small-pictures {
    padding: 10px;
    display: flex;
    flex-wrap: wrap;
    overflow-x: auto;
    max-height: 350px; /* Set the maximum height for the container */
}

@media screen and (max-width: 1024px) {
    .content-container .small-pictures {
        max-width: 99%;
        overflow: auto;
        display: grid;
        grid-gap: 10px; /* Adjust the gap between items as needed */
        grid-auto-flow: column dense;
        grid-template-rows: inherit;
        padding: 10px;
        grid-column: 1;
    }

    .content-container .main-picture img {
        max-height: 360px; /* Ensure the main picture fits within its container */
        width: 100%;
        height: auto;
        display: flex;
        align-items: center; /* Vertically center the content within the column */
        justify-content: center;
        padding: 0 0 25px;
        margin: 0 auto;
    }
}

.content-container .image {
    flex: 0 0 auto;
    width: auto; /* Set the width of each image */
    max-height: 90%; /* Set the height of each image */
    object-fit: cover; /* Maintain the aspect ratio and cover the container */
    margin: 0 auto; /* Add some margin between images */
}

.wsite-for-sale-grid-item.price {
    color: white;
    text-align: center;
    grid-column: 1/3;
    display: flex;
    justify-content: center; /* Horizontally center the content */
    align-items: center; /* Vertically center the content */
    position: relative; /* Enable relative positioning */
    font-weight: bold;
    font-size: large;
}

.wsite-for-sale-grid-item.price .label {
    margin-right: 5px; /* Adjust spacing between the label and price */
}

.wsite-for-sale-grid-item.price .wsite-contact-button {
    position: absolute;
    top: 0;
    right: 0;
    order: 2;
}

.wsite-for-sale-grid-item.price .wsite-contact-button a {
    color: black;
    text-decoration: none;
}

@media (max-width: 500px) {
    .wsite-for-sale-grid-item.price {
        justify-content: left; /* Horizontally center the content */
    }
}

.content-container .wsite-for-sale-title {
    grid-column: 1 / -1;
    border-bottom: 1px solid white;

}

.content-container .wsite-for-sale-grid-container h2 {
    color: white;
    text-align: center;
    text-decoration: underline;
}


@media (min-width: 1024px) {
    .wsite-for-sale-grid-item.small-pictures::-webkit-scrollbar {
        width: 10px; /* Set the width of the scrollbar */
    }

    .wsite-for-sale-grid-item.small-pictures::-webkit-scrollbar-track {
        background-color: #f1f1f1; /* Set the background color of the scrollbar track */
        border-radius: 6px; /* Add rounded corners to the scrollbar thumb */
    }

    .wsite-for-sale-grid-item.small-pictures::-webkit-scrollbar-thumb {
        background-color: #888; /* Set the color of the scrollbar thumb */
        border-radius: 5px; /* Add rounded corners to the scrollbar thumb */
    }

    .wsite-for-sale-grid-item.small-pictures::-webkit-scrollbar-thumb:hover {
        background-color: #6d6d6d; /* Set the color of the scrollbar thumb on hover */
    }

    /* Styles the scrollbar height */
    .wsite-for-sale-grid-item.small-pictures::-webkit-scrollbar-track {
        margin-bottom: 10px;
        margin-top: 10px;
    }

}

.content-container .edittable-item {
    color: white;
    white-space: normal;
    word-wrap: break-word;
}

.wsite-for-sale-description {
    display: flex;
    justify-content: center;
}


.content-container p.edittable-item {
    text-align: center;
    white-space: pre-line;
}


@media screen and (max-width: 1024px) {
    .content-container .wsite-for-sale-grid-container {
        display: grid;
        grid-template-columns: 100%; /* Adjust column width as needed */
        grid-template-rows: 1fr; /* Set the second row to take remaining height */
        margin-bottom: 20px;
        border-collapse: collapse;
        border: 1px solid white;
    }

    .content-container .main-picture {
        align-self: start;
        max-width: 400px;
        margin: 0 auto;
        grid-column: 1/2;
    }

    .content-container .wsite-for-sale-grid-container:has(.small-pictures) .description {
        grid-column: 1/-1; /* Position .description on the right column */
        grid-row: 4; /* Occupy both rows */
        align-self: center; /* Vertically center the .description within the grid item */
        border-top: 1px solid white;
    }


    .content-container .wsite-for-sale-grid-container:not(:has(.small-pictures)) .description {
        grid-column: 1/-1; /* Position .description on the right column */
        grid-row: 3; /* Occupy both rows */
        align-self: center; /* Vertically center the .description within the grid item */
        border-top: 1px solid white;
    }

}

table {
    border-collapse: collapse;
}

.wsite-white-border {
    border: 1px solid white;
}

td > img {
    width: 100%;
}

.image {
    width: 200px;
    height: 200px;
}

td {
    color: white;
    width: 50%;
    position: relative;
}

th.productTitle {
    font-size: x-large;
}

h3:not(.wsite-admin-panel), th:not(.wsite-admin-panel) {
    color: white;
    text-align: center;
}
h3.wsite-admin-panel, th.wsite-admin-panel {
    color: white;
}

.wsite-right-text {
    vertical-align: top;
    margin-left: 5px;
    text-align: center;
}

/* Small clickable thumbnail pictures at the bottom */
.filmstrip {
    height: 100px;
    max-width: 450px;
    margin: 0.5em auto;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: start;
    align-items: center;
    overflow: hidden;
    overflow-x: scroll;
}

/* Each small thumbnail image */
.filmstrip img, .filmstrip span {
    display: flex;
    height: 88%;
    width: auto;
    margin-right: 6px;
    cursor: pointer;
}

.wsite-contact-button {
    position: absolute;
    bottom: 0;
    right: 0;
    border-radius: 5px;
}

.overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    /* bring your own prefixes */
    transform: translate(-50%, -50%);
}

.popup {
    margin: 70px auto;
    padding: 20px;
    background: #444040;
    border-radius: 5px;
    width: 40%;
    position: relative;
    transition: all 5s ease-in-out;
}

.popup h2 {
    margin-top: -20px;
    color: white;
    font-family: Tahoma, Arial, sans-serif;
}

.popup .close {
    position: absolute;
    top: 5px;
    right: 22px;
    transition: all 200ms;
    font-size: 30px;
    font-weight: bold;
    text-decoration: none;
    color: white;
    cursor: pointer;
}

.popup .close:hover {
    color: #06D85F;
}

.popup .content {
    max-height: 30%;
    overflow: auto;
}

@media screen and (max-width: 1024px) {
    .box {
        width: 70%;
    }

    .popup {
        width: 70%;
    }

    .overlay {
        top: 60%
    }
}

.contact-section-popup h1 {
    color: white;
}

.contact-section-popup .contact-form-text, input[type=email], input[type=submit], textarea {
    width: 100%;
    text-align: center;
    padding: 12px;
    border: 1px solid #767676;
    border-radius: 6px;
    box-sizing: border-box;
    margin-top: 6px;
    margin-bottom: 16px;
    resize: vertical;
}

textarea {
    height: 200px;
}

textarea.wsite-admin-textarea {
    height: 300px;
}
label.wsite-input-image-label {
    background-color: indigo;
    color: white;
    padding: 0.5rem;
    font-family: sans-serif;
    border-radius: 0.3rem;
    cursor: pointer;
    margin-top: 1rem;
}

.contact-section-popup input[type=text]:hover, input[type=email]:hover, input[type=submit]:hover, textarea:hover {
    background: lightgrey;
}

.wsite-product-title-input {
    width: 80%;
    height: 30px;
    text-align: center;
}
#incorrectFile .modal-red.modal-content, #incorrectFile .close,#noMainImage .modal-red.modal-content, #noMainImage .close {
    background-color: red;
    color: white;
}

#incorrectFile .modal-header, #noMainImage .modal-header {
    border-bottom: 0;
}

.wsite-uploaded-image {
    position: relative;
    display: inline-block;
}

img.wsite-uploaded-image:hover {
    opacity: 0.8;
}

span.trash-icon {
    height: 30px;
    width: 30px;
    background-color: white;
    position: absolute;
    top: 0;
    right: 0;
    cursor: pointer;
    color: black;
    border-radius: 15px;
}

i.trash-icon {
    position: absolute;
    top: 15px;
    right: 5px;
    cursor: pointer;
    color: black;
}

.upload-button {
    width: 99%;
    text-align: center;
    cursor: pointer;
}

.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.popup-content {
    background-color: #fefefe;
    padding: 20px;
    max-width: 400px;
    position: relative;
    border-radius: 15px;
}

.popup-close {
    position: absolute;
    top: -10px;
    right: 5px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.popup-title {
    text-align: center;
}

.popup-content h4 {
    display: block;
    font-size: 1.5em;
    margin-inline-start: 0;
    margin-inline-end: 0;
    font-weight: bold;
}