/*
 * Created By : Ahmad Windi Wijayanto
 * Email : ahmadwindiwijayanto@gmail.com
 * Github : https://github.com/whendy
 * LinkedIn : https://www.linkedin.com/in/ahmad-windi-wijayanto/
 *
 */

/* Dropzone */
.dropzone {
    border: 2px dashed #4a90e2;
    background: #fff;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    color: #666;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 3px 6px rgba(0,0,0,0.05);
}
.dropzone:hover {
    background: #f9fbff;
}
.dropzone.dragover {
    background: #e8f2ff;
    border-color: #357abd;
    color: #357abd;
}
.dropzone input {
    display: none;
}

/* Preview grid */
.preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
    margin-top: 25px;
}

/* Preview card */
.preview-item {
    position: relative;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    font-size: 13px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
    transition: transform 0.2s;
}
.preview-item:hover {
    transform: translateY(-2px);
}

.preview-item img,
.preview-item video {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 8px;
}

.file-icon {
    width: 100%;
    height: 100px;
    border-radius: 6px;
    background: linear-gradient(135deg, #e3e3e3, #f5f5f5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: #555;
    margin-bottom: 8px;
}

/* Remove button */
.remove-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(255, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 14px;
    line-height: 20px;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s;
}
.remove-btn:hover {
    background: red;
}

/* Error message */
.error {
    color: red;
    font-size: 14px;
    margin-top: 12px;
}

/* Upload button */
#uploadBtn {
    margin-top: 25px;
    padding: 12px 25px;
    background: #4a90e2;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.25s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
#uploadBtn:hover {
    background: #357abd;
}

.form-tambah-korban {
    border: 1px solid #ccc;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
    border-radius: 5px;
    padding: 8px;
}

fieldset.fieldset-aduan {
    /*border: 1px solid #999797;
    border-radius: 5px;*/
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
    padding: 35px 10px;
    position: relative;
}

fieldset.fieldset-aduan legend {
    position: absolute;
    width: fit-content;
    top: -20px;         /* geser ke atas */
    left: 20px;         /* geser ke kanan */
    background: white;
    padding: 0 10px;
    font-weight: bold;
}

