﻿/* =========================================================
   CLEAR FORM CONFIRMATION POPUP
   ========================================================= */

.clear-form-popup {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.55);
}

    .clear-form-popup[hidden] {
        display: none;
    }


/* Dialog */

.clear-form-dialog {
    width: min(460px, 100%);
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    animation: clearFormPopupIn 0.2s ease-out;
}


/* Header */

.clear-form-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid #e5e5e5;
}

    .clear-form-header h3 {
        margin: 0;
        font-size: 20px;
        font-weight: 600;
        color: #222;
    }


/* Close button */

.clear-form-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #666;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

    .clear-form-close:hover {
        background: #f2f2f2;
        color: #222;
    }


/* Body */

.clear-form-body {
    padding: 22px;
}

.clear-form-question {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 500;
    color: #222;
}

.clear-form-description {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #666;
}


/* Footer */

.clear-form-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 22px;
    background: #fafafa;
    border-top: 1px solid #e5e5e5;
}


/* Buttons */

.clear-form-btn {
    min-width: 90px;
    height: 40px;
    padding: 0 18px;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}


/* Cancel */

.clear-form-btn-cancel {
    border: 1px solid #d5d5d5;
    background: #ffffff;
    color: #333;
}

    .clear-form-btn-cancel:hover {
        background: #f3f3f3;
    }


/* Confirm */

.clear-form-btn-confirm {
    border: 1px solid #861546;
    background: #861546;
    color: #ffffff;
}

    .clear-form-btn-confirm:hover {
        background: #6f103a;
        border-color: #6f103a;
    }


/* Animation */

@keyframes clearFormPopupIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* Mobile */

@media (max-width: 480px) {

    .clear-form-popup {
        padding: 15px;
    }

    .clear-form-dialog {
        width: 100%;
        border-radius: 10px;
    }

    .clear-form-header {
        padding: 16px 18px;
    }

    .clear-form-body {
        padding: 20px 18px;
    }

    .clear-form-footer {
        padding: 14px 18px;
    }

    .clear-form-btn {
        flex: 1;
    }
}



/* =========================================================
   FILE UPLOAD STATUS
   ========================================================= */

.file-upload-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 7px;
    font-size: 13px;
    line-height: 1.4;
}


/* Uploading state */
.file-upload-status.uploading {
    color: #555;
}


/* Small loading spinner */
.file-upload-status.uploading::before {
    content: "";
    width: 14px;
    height: 14px;
    border: 2px solid #ddd;
    border-top-color: #861546;
    border-radius: 50%;
    animation: fileUploadSpin 0.7s linear infinite;
    flex-shrink: 0;
}


/* Successfully uploaded */
.file-upload-status.success {
    color: #198754;
    font-weight: 500;
}

.file-upload-status.success::before {
    content: "✓";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}


/* Upload failed */
.file-upload-status.error {
    color: #dc3545;
    font-weight: 500;
}

.file-upload-status.error::before {
    content: "!";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    border: 1px solid currentColor;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    flex-shrink: 0;
}

/* Spinner animation */
@keyframes fileUploadSpin {
    to {
        transform: rotate(360deg);
    }
}