@import url("https://fonts.cdnfonts.com/css/satoshi");

* {
    box-sizing: border-box;
    font-family: "Satoshi", sans-serif;
    font-weight: 100;
}

body {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    min-height: 100vh;
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
    background-color: rgb(255, 255, 255);
    color: rgb(255, 255, 255);
    height: 70px;
    padding: 0 20px;
}

.app-header h2 {
    cursor: pointer;
    color: black;
    font-weight: 100;
}

.item-search-input {
    width: 300px;
    height: 33px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    padding: 5px;
    background-color: rgba(248, 246, 244);
    border: 1px solid rgb(232, 232, 232);
    box-shadow: inset 3px 3px 4px rgba(214, 214, 214, 0.475);
}

.item-search-input:focus {
    outline: none;
}

.app-header button {
    height: 33px;
    width: auto;
    min-width: 130px;
    font-size: 15px;
    border-radius: 10px;
    border: none;
    border: 1px solid rgb(232, 232, 232);
    box-shadow: inset 5px 3px 4px rgba(214, 214, 214, 0.678);
    background-color: #f5f5f5;
    color: rgb(0, 0, 0);
}

.app-header button:hover {
    transition: 0.8s;
    border: 1px solid rgb(232, 232, 232);
    box-shadow: inset 5px 3px 4px rgba(214, 214, 214, 0.678);
    background-color: #ffffff;
}

.header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.owned-items-toggle-label {
    color: black;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: 0.4s;
    transition: 0.4s;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    -webkit-transition: 0.4s;
    transition: 0.4s;
}

input:checked + .toggle-slider {
    background-color: rgb(0, 0, 0);
}

input:focus + .toggle-slider {
    box-shadow: 0 0 1px darkgray;
}

input:checked + .toggle-slider:before {
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
}

.toggle-slider.is-rounded {
    border-radius: 34px;
}

.toggle-slider.is-rounded:before {
    border-radius: 50%;
}

.filter-bar-wrapper {
    width: 100%;
    background-color: rgba(248, 246, 244);
    border: 1px solid rgb(232, 232, 232);
}

.category-filter-list {
    display: flex;
    align-items: center;
    margin: 0 auto;
    height: 50px;
    width: 100%;
    max-width: 1800px;
    background-color: rgba(248, 246, 244);
    gap: 10px;
    padding: 0 18px;
}

.category-filter-list button {
    width: auto;
    min-width: 80px;
    height: 30px;
    background: none;
    border-radius: 10px;
    border: 1px solid rgb(209, 209, 209);
    background-color: rgba(248, 246, 244);
    color: black;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.category-filter-list button.is-active {
    background-color: black;
    color: white;
}

.category-filter-list button:hover {
    background: rgb(255, 255, 255);
    transition: 0.4s;
    box-shadow: 0px 2px 4px rgba(214, 214, 214, 0.475);
}

.items-page-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    flex: 1;
    padding: 20px;
    background-color: rgba(248, 246, 244);
}

.items-section-header {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1800px;
    height: 80px;
}

.items-section-header label {
    font-size: 22px;
    margin: 0px 0px 10px 0px;
}

.items-section-header p {
    font-size: 14px;
    margin: 0;
}

.items-section-header div {
    border-bottom: 3px solid black;
    width: 60px;
    border-radius: 10px;
    margin-top: 10px;
}

.item-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, 330px);
    gap: 20px;
    width: 100%;
    max-width: 1800px;
    justify-content: start;
    margin: 0 auto;
}

.item-card {
    display: flex;
    margin-top: 20px;
    flex-direction: column;
    align-items: center;
    min-height: 180px;
    width: 330px;
    height: auto;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0px 5px 5px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition:
        box-shadow 0.3s ease-in-out,
        transform 0.2s ease;
}

.item-card p {
    display: none;
}

.item-card:hover {
    transform: translateY(-6px);
    box-shadow: 0px 10px 5px rgba(0, 0, 0, 0.15);
}

.item-card-image-wrapper {
    width: 100%;
    height: 220px;
    flex-shrink: 0;
    background-color: rgba(237, 233, 228);
    position: relative;
}

.item-card-category {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: rgba(248, 246, 244);
    color: rgb(0, 0, 0);
    padding: 5px 12px;
    border-radius: 10px;
    font-size: 11px;
    z-index: 10;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.item-card-image-wrapper img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    display: block;
    border: none;
    border-top-right-radius: 10px;
    border-top-left-radius: 10px;
}

.item-card-title-row {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 20px;
    justify-content: space-between;
    height: 20px;
}

.item-card-title-row h3 {
    margin: 0;
    font-weight: 400;
}

.item-card-location-row {
    display: flex;
    width: 100%;
    padding: 10px;
    align-items: center;
    margin: 0;
    height: 0px;
}

.item-card-location-row div {
    color: rgb(0, 0, 0);
    padding: 5px 12px;
    font-size: 12px;
}

.item-card-meta-row {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 10px;
}

.item-card-meta-row div {
    color: rgb(0, 0, 0);
    padding: 5px 12px;
    display: flex;
    align-items: center;
    font-size: 12px;
    width: auto;
}

.item-card-meta-row div img,
.item-card-location-row div img {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    object-fit: contain;
}

.item-card-meta-row div,
.item-card-location-row div {
    display: flex;
    align-items: center;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    z-index: 1000;
    transition: opacity 0.3s ease;
}

.modal-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.modal-panel {
    background-color: white;
    padding: 30px;
    border-radius: 12px;
    width: 1050px;
    max-width: 95%;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    gap: 20px;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.is-visible .modal-panel {
    transform: scale(1);
}

.modal-title {
    margin: 0;
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

.modal-body-layout {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 30px;
    align-items: start;
}

.details-contact-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.details-contact-row button {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: transparent;
    border: none;
}

.details-contact-row button:active {
    transform: scale(1.1);
    transition: 0.3;
}

.details-contact-row i {
    background-color: transparent;
}

.image-upload-drop-zone {
    width: 100%;
    height: 325px;
    border: 2px dashed #ccc;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    transition:
        border-color 0.3s ease,
        background-color 0.3s ease,
        transform 0.2s ease;
}

.image-upload-drop-zone:hover {
    transform: scale(1.02);
}

.image-upload-drop-zone.is-dragging-file {
    border-color: black;
    background-color: rgba(0, 0, 0, 0.05);
}

.image-upload-placeholder {
    text-align: center;
    color: #777;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.image-upload-placeholder i {
    font-size: 40px;
}

.image-upload-placeholder p {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
}

.uploaded-image-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.uploaded-image-preview:not([hidden]) ~ .image-upload-placeholder {
    display: none;
}

img:not([src]),
img[src=""] {
    visibility: hidden;
}

.create-item-form-fields {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-field-row {
    display: flex;
    gap: 15px;
    width: 100%;
}

.form-field-row > div {
    flex: 1;
}

.form-field {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.create-item-form-fields label {
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

.text-field,
.textarea-field,
.compact-field,
.select-field {
    padding: 8px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 14px;
    transition:
        box-shadow 0.3s ease,
        border-color 0.3s ease;
}

.select-field {
    width: 100%;
    background-color: white;
}

.text-field:focus,
.textarea-field:focus,
.compact-field:focus {
    outline: none;
    border-color: black;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

.textarea-field {
    height: 100px;
    resize: none;
}

.modal-actions {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    width: 100%;
}

.primary-button,
.secondary-button {
    background-color: black;
    color: white;
    cursor: pointer;
    height: 50px;
    border-radius: 10px;
    border: none;
    flex: 1;
    font-size: 16px;
    font-weight: bold;
    transition:
        background-color 0.3s,
        color 0.3s,
        box-shadow 0.3s,
        transform 0.1s;
}

.secondary-button {
    background-color: #333;
}

.primary-button:hover,
.secondary-button:hover {
    background-color: white;
    color: black;
    box-shadow: 1px 1px 10px black;
}

.primary-button:active,
.secondary-button:active {
    transform: scale(0.95);
}

.modal-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.round-close-button {
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    padding: 0;
}

.details-image-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: default;
    border: 1px solid #ccc;
    height: 400px;
    overflow: hidden;
    border-radius: 10px;
    position: relative;
}

.details-image-wrapper .uploaded-image-preview {
    max-width: 100%;
    max-height: 100%;
    position: absolute;
    inset: 0;
}

.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    font-size: 15px;
}

.details-field {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    border: 1px solid #eee;
}

.details-field label {
    font-size: 11px;
    text-transform: uppercase;
    color: #888;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
}

.details-field span {
    font-weight: 400;
    color: #222;
}

.details-description-section {
    grid-column: span 2;
    margin-top: 10px;
}

.details-description-section label {
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 5px;
    display: block;
}

.details-description-text {
    margin: 0;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #eee;
    border-radius: 12px;
    min-height: 80px;
    font-size: 14px;
    line-height: 1.5;
    color: #444;
}

.details-contact-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    background: #f8f9fa;
    border: 1px solid #eee;
    border-radius: 12px;
}

.details-contact-row span {
    font-size: 14px;
    color: #333;
}

.details-contact-row button {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    transition: all 0.2s;
}

.details-contact-row button:hover {
    background-color: #eee;
}

.app-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    height: 80px;
    width: 100%;
    flex-shrink: 0;
    background-color: #1a1815;
}

@media (max-width: 768px) {
    .item-card-grid {
        grid-template-columns: 1fr;
        padding: 10px;
        gap: 15px;
    }

    .item-card {
        width: 100%;
        max-width: 100%;
        border-radius: 15px;
    }

    .app-header {
        flex-wrap: wrap;
        height: auto;
        padding: 20px;
        gap: 15px;
    }

    .app-header h2 {
        padding: 0 10px;
    }

    .item-search-input {
        order: 3;
        width: 100%;
    }

    .category-filter-list {
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        height: 60px;
        scrollbar-width: none;
        padding: 0 30px;
    }

    .category-filter-list::-webkit-scrollbar {
        display: none;
    }

    .category-filter-list button {
        flex-shrink: 0;
        height: 40px;
        padding: 0 20px;
    }

    .items-section-header {
        padding: 0 12px;
    }

    .modal-panel {
        width: 95%;
        padding: 20px;
        max-height: 90vh;
        overflow-y: auto;
    }

    .modal-body-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .image-upload-drop-zone,
    .details-image-wrapper {
        height: 200px;
    }

    .form-field-row {
        flex-direction: row;
        gap: 10px;
    }

    .modal-actions {
        flex-direction: row;
        gap: 10px;
    }

    .primary-button,
    .secondary-button {
        height: 44px;
        font-size: 14px;
    }
}

@media (min-width: 769px) {
    .item-card-grid {
        grid-template-columns: repeat(auto-fill, 330px);
    }
}

.app-footer a {
    text-decoration: none;
    color: rgb(255, 255, 255);
}

.app-footer p {
    text-decoration: none;
    color: rgb(255, 255, 255);
}

.fa-github {
    justify-content: center;
    font-size: 30px;
    color: white;
}
