/* Material Upload Page Styles */

.file-upload {
    position: relative;
    display: inline-block;
    width: 100%;
    height: 100px; /* Compact height */
}

.file-upload-input {
    position: relative;
    z-index: 2; /* Increased z-index to ensure it's clickable */
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-upload-btn {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 12px;
    border: 2px dashed #999;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #f8f9fa;
}

.file-upload-btn:hover {
    border-color: #0d6efd;
    background-color: rgba(13, 110, 253, 0.05);
}

.file-upload-icon {
    font-size: 2rem;
    margin-bottom: 8px;
    color: #1a237e;
}

.file-upload-text {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #6c757d;
}

.file-preview {
    margin-top: 15px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    display: none;
}

.file-preview.active {
    display: block;
}

/* Form label styles for modal */
.form-label {
    font-weight: 500;
    color: #333;
    margin-bottom: 0.5rem;
}

/* Ensure consistent form styling in modal */
.modal-body .form-control,
.modal-body .form-select {
    border-radius: 0.375rem;
}

.modal-body .form-control:focus,
.modal-body .form-select:focus {
    border-color: #1a237e;
    box-shadow: 0 0 0 0.2rem rgba(26,35,126,0.25);
}

/* Windows dropdown fix for modal selects - Only for non-premium themes */
body:not(.premium-theme) .modal-body .form-select {
    background-color: #fff !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
}

body:not(.premium-theme) .modal-body .form-select option {
    background-color: #fff !important;
    color: #212529 !important;
    padding: 0.5rem !important;
}

body:not(.premium-theme) .modal-body select.form-select option:hover,
body:not(.premium-theme) .modal-body select.form-select option:focus,
body:not(.premium-theme) .modal-body select.form-select option:checked {
    background-color: #e9ecef !important;
    color: #212529 !important;
}

/* Modal header title centering */
.modal-header .modal-title {
    margin: 0;
}

/* RTL support for modal header */
html[dir="rtl"] .modal-header .btn-close.position-absolute {
    left: 1rem;
    right: auto;
}

/* Mobile form label adjustments */
@media (max-width: 768px) {
    .form-label {
        font-size: 0.85rem;
        font-weight: 500;
    }
}
