﻿
.upload-container {
    width: 600px;
    margin: auto;
}

.upload-box {
    border: 2px dashed #ccc;
    padding: 20px;
    text-align: center;
    cursor: pointer;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.image-card img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    cursor: pointer;
}

.desc-box {
    width: 100%;
    margin-top: 15px;
    padding: 10px;
}

.upload-btn {
    margin-top: 10px;
    padding: 10px;
    width: 100%;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
}

.modal-content {
    background: #fff;
    margin: 50px auto;
    padding: 20px;
    width: 400px;
}

.filters button {
    margin: 5px;
}

.preview-grid {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.preview-img {
    width: 120px;
    height: 120px;
    object-fit: cover; /* 🔥 IMPORTANT */
    border-radius: 8px;
    display: block; /* 🔥 FIX GAP ISSUE */
}

.upload-container {
    width: 600px;
    margin: auto;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
}

.drop-zone {
    border: 2px dashed #aaa;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    margin-bottom: 20px;
}

.preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-start;
}

/* .preview-item {
        width: 120px;
        height: 120px;
        background: #f3f3f3; 
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
    } */
.preview-item {
    position: relative;
    width: 120px;
    height: 120px;
    background: #f3f3f3;
    border-radius: 8px;
    overflow: hidden;
}

.img-actions {
    position: absolute;
    top: 5px;
    right: 5px;
    display: flex;
    gap: 5px;
}

    .img-actions button {
        background: rgba(0,0,0,0.6);
        color: white;
        border: none;
        border-radius: 50%;
        width: 25px;
        height: 25px;
        cursor: pointer;
    }

.preview-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* 🔥 SHOW FULL IMAGE */
}

.desc-box {
    width: 100%;
    height: 80px;
    margin-top: 15px;
}

.btn-upload {
    margin-top: 10px;
    padding: 10px 20px;
    background: #ff4081;
    color: white;
    border: none;
    border-radius: 5px;
}

.crop-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    /* 👉 KEY FIX */
    /* overflow: auto; */
    padding: 20px;
}

/* .crop-container {
        background: white;
        border-radius: 10px;
        width: 100%;
        max-width: 500px;
        height: 90vh; 
        display: flex;
        flex-direction: column;
        padding: 20px;
    } */
.crop-container {
    background: white;
    border-radius: 10px;
    width: 100%;
    max-width: 700px;
    height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#cropImage {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.filter-bright {
    filter: brightness(1.2);
}

.filter-contrast {
    filter: contrast(1.4);
}

.filter-sepia {
    filter: sepia(1);
}

#progressText {
    text-align: center;
    margin-top: 5px;
    font-weight: bold;
}

/*filters*/
/* .filter-panel {
        margin-top: 10px;       
        overflow-y: auto;
        max-height: 250px;
        display: flex;
        flex-direction: column;
        gap: 8px;
    } */
/* .filter-panel {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        gap: 5px;
    } */
.filter-panel {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

    .filter-panel label {
        font-size: 12px;
    }

    .filter-panel input[type="range"] {
        width: 100%;
        margin: 2px 0;
    }

/* .filter-actions {
        position: sticky;
        bottom: 0;
        background: white;
        padding-top: 10px;
        display: flex;
        gap: 10px;
    } */
/* .filter-actions {
        display: flex;
        gap: 10px;
        margin-top: auto; 
    } */
.filter-actions {
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

/*aspect ratio*/
.aspect-ratio-controls {
    display: flex;
    gap: 8px;
    margin: 10px 0;
}

    .aspect-ratio-controls button {
        flex: 1;
        padding: 5px;
        border: none;
        background: #eee;
        cursor: pointer;
        border-radius: 5px;
    }

        .aspect-ratio-controls button:hover {
            background: #ddd;
        }

.image-area {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.controls-area {
    padding: 10px;
    background: white;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/*@media (min-width: 768px) {
    .crop-container {
        flex-direction: row;
    }
    .image-area {
        width: 65%;
    }
    .controls-area {
        width: 35%;
    }
}*/
