/**
 * READ Portal — modern file upload (drop zone + file chip)
 */
.read-file-upload {
    position: relative;
    width: 100%;
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.read-file-upload__input {
    position: absolute !important;
    width: 0.1px !important;
    height: 0.1px !important;
    opacity: 0 !important;
    overflow: hidden !important;
    z-index: -1 !important;
    pointer-events: none !important;
}

.read-file-upload__zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 132px;
    padding: 1.35rem 1.25rem;
    border: 2px dashed #c5d4e8;
    border-radius: 12px;
    background: linear-gradient(180deg, #fafbfd 0%, #f3f7fb 100%);
    cursor: pointer;
    text-align: center;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
    margin: 0;
}

.read-file-upload__zone:hover,
.read-file-upload__zone:focus-within {
    border-color: #163763;
    background: linear-gradient(180deg, #f0f6fc 0%, #e8f1fa 100%);
    box-shadow: 0 6px 20px rgba(0, 33, 71, 0.08);
}

.read-file-upload.is-dragover .read-file-upload__zone {
    border-color: #002147;
    background: #e8f1fa;
    box-shadow: 0 0 0 3px rgba(0, 33, 71, 0.12);
    transform: scale(1.01);
}

.read-file-upload.has-file .read-file-upload__zone {
    min-height: 88px;
    padding: 0.85rem 1rem;
    border-style: solid;
    border-color: #a8c4e0;
    background: #f7fafc;
}

.read-file-upload__icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #002147 0%, #163763 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    box-shadow: 0 4px 14px rgba(0, 33, 71, 0.22);
}

.read-file-upload.has-file .read-file-upload__icon {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
}

.read-file-upload__title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #002147;
    line-height: 1.35;
}

.read-file-upload__title strong {
    color: #163763;
    font-weight: 700;
}

.read-file-upload__hint {
    margin: 0;
    font-size: 0.8rem;
    color: #5c6b7a;
    line-height: 1.4;
    max-width: 320px;
}

.read-file-upload__file {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.65rem 0.85rem;
    background: #fff;
    border: 1px solid #dde4ec;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 33, 71, 0.06);
}

.read-file-upload__file[hidden] {
    display: none !important;
}

.read-file-upload__file-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #e8f1fa;
    color: #002147;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.read-file-upload__file-icon.is-image {
    background: #e8f5ef;
    color: #1a6b4a;
}

.read-file-upload__file-icon.is-pdf {
    background: #fdecea;
    color: #b42318;
}

.read-file-upload__file-body {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.read-file-upload__file-name {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #1a2b3c;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.read-file-upload__file-meta {
    display: block;
    font-size: 0.75rem;
    color: #5c6b7a;
    margin-top: 0.15rem;
}

.read-file-upload__clear {
    flex-shrink: 0;
    border: none;
    background: transparent;
    color: #5c6b7a;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    padding: 0;
    line-height: 1;
}

.read-file-upload__clear:hover {
    background: #fdecea;
    color: #b42318;
}

.read-file-upload__clear i {
    font-size: 1rem;
}

.read-file-upload.is-invalid .read-file-upload__zone {
    border-color: #b42318;
    background: #fff8f7;
}

/* Hide redundant hint below when enhanced */
.form-group:has(.read-file-upload) > small.text-muted {
    display: none;
}

/* Profile / modal spacing */
#profileModal .read-file-upload,
.modal .read-file-upload {
    margin-top: 0.25rem;
}

@media (max-width: 576px) {
    .read-file-upload__zone {
        min-height: 118px;
        padding: 1rem;
    }

    .read-file-upload__hint {
        font-size: 0.75rem;
    }
}
