/* ── Image Upload Area Component ── */

/* Compact wrapper */
.image-upload-compact {
    width: 100%;
    display: flex;
    flex-direction: column;
}

/* ── Base upload area ── */
.image-upload-area {
    position: relative;
    width: 100%;
    min-height: 180px;
    border: 2px dashed rgba(239, 251, 83, 0.3);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-upload-area:hover {
    border-color: rgba(239, 251, 83, 0.5);
    background: rgba(239, 251, 83, 0.05);
    transform: translateY(-2px);
}

.image-upload-area.dragover {
    border-color: #EFFB53;
    background: rgba(239, 251, 83, 0.08);
}

.image-upload-area.has-image {
    border-style: solid;
    cursor: default;
}

/* ── Placeholder ── */
.upload-placeholder {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    text-align: center;
}

.upload-placeholder i {
    font-size: 3rem;
    color: rgba(239, 251, 83, 0.5);
    margin-bottom: 12px;
}

.upload-placeholder .upload-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: center;
}

.upload-placeholder span {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: #FFFFFF;
}

.upload-placeholder small {
    display: block;
    font-size: 0.8rem;
    color: rgba(205, 205, 205, 0.7);
    font-weight: 400;
    line-height: 1.4;
}

.upload-placeholder small.max-size {
    font-size: 0.75rem;
    color: rgba(205, 205, 205, 0.5);
}

/* ── Preview ── */
.upload-preview {
    position: relative;
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px;
    min-height: 180px;
    overflow: hidden;
}

.upload-preview img {
    max-width: 100%;
    max-height: 160px;
    border-radius: 8px;
    object-fit: contain;
    flex-shrink: 0;
}

.upload-preview-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    width: 100%;
}

.preview-filename {
    font-size: 0.82rem;
    color: #CDCDCD;
    font-weight: 500;
    text-align: center;
    word-break: break-all;
}

.preview-dims {
    font-size: 0.76rem;
    color: #888;
}

/* ── Remove button ── */
.remove-image-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(220, 53, 69, 0.9);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.remove-image-btn:hover {
    background: #dc3545;
    transform: scale(1.1);
}

/* ── Compact: dimension overrides only ── */
.image-upload-area.compact {
    min-height: 166px;
    border-radius: 14px;
}

.image-upload-area.compact .upload-placeholder {
    padding: 20px 15px;
}

.image-upload-area.compact .upload-placeholder i {
    font-size: 2.5rem;
}

.image-upload-area.compact .upload-preview {
    padding: 10px;
    min-height: auto;
    gap: 6px;
}

.image-upload-area.compact .upload-preview img {
    max-height: 110px;
}

.image-upload-area.compact .remove-image-btn {
    width: 28px;
    height: 28px;
    top: 8px;
    right: 8px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .image-upload-area {
        min-height: 150px;
    }

    .upload-placeholder {
        padding: 20px 15px;
    }

    .upload-placeholder i {
        font-size: 2.5rem;
    }

    .image-upload-area.compact {
        min-height: 140px;
    }

    .image-upload-area.compact .upload-placeholder {
        flex-direction: row;
        gap: 15px;
        padding: 15px 20px;
    }

    .image-upload-area.compact .upload-placeholder i {
        font-size: 2rem;
        margin-bottom: 0;
    }

    .image-upload-area.compact .upload-placeholder span,
    .image-upload-area.compact .upload-placeholder small {
        text-align: left;
    }
}
