.upload-file-input {
    min-height: auto;
}

#file-upload .delete-file-btn {
    position: absolute;
    top: -5px;
    right: -10px;
    width: 17px;
    height: 17px;
    padding: 0 !important;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    border-radius: 50%;
    justify-content: center;
    z-index: 1;
}

#file-upload .delete-file-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #dc3545;
    border-radius: 50%;
    z-index: -1;
}

#file-upload .delete-file-btn i {
    position: relative;
    font-size: 11px;
    color: #fff;
    padding-right: 0;
}

.file-thumb {
    border-radius: 6px;
}

.file-view-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0);
    color: #fff;
    font-size: 18px;
    opacity: 0;
    transition: background 0.2s ease, opacity 0.2s ease;
    border-radius: 6px;
}

.file-thumb:hover .file-view-overlay {
    background: rgba(0, 0, 0, 0.4);
    opacity: 1;
}

/* --------------------------------------------------------------------------
   Metronic resolves --bs-text-secondary to #F1F1F4, which is all but invisible
   on a light background (contrast ~1.05:1). Fall back to the gray-700 token so
   the colour stays theme-aware but readable everywhere.
   -------------------------------------------------------------------------- */
.text-secondary {
    color: var(--bs-gray-700) !important;
}

/* --------------------------------------------------------------------------
   plugins.bundle.css forces every select2 single selection to 28px, so it no
   longer lines up with a native .form-select (43.5px). Restore the Bootstrap
   form-control box model inside the manual course editor.
   -------------------------------------------------------------------------- */
.manual-editor .select2-container {
    width: 100% !important;
}

.manual-editor .select2-container .select2-selection--single {
    height: auto;
    /* same box model as .form-select: 1.5 x 1.1rem text + 2 x .775rem padding + border */
    min-height: calc(1.65rem + 1.55rem + 2px);
    display: flex;
    align-items: center;
    padding: .775rem 1rem;
    border: 1px solid var(--bs-gray-300);
    border-radius: .475rem;
    background-color: var(--bs-body-bg);
}

.manual-editor .select2-container .select2-selection--single .select2-selection__rendered {
    padding: 0;
    font-size: 1.1rem;
    line-height: 1.5;
    color: var(--bs-gray-700);
}

.manual-editor .select2-container .select2-selection--single .select2-selection__arrow {
    height: 100%;
    top: 0;
    right: .5rem;
}
