/* ═══════════════════════════════════════════════════════════════
   Help text shown below field labels
   ═══════════════════════════════════════════════════════════════ */

.field-help-text {
    font-size: 0.82rem;
    color: #6c757d;
    margin: 2px 0 8px;
    line-height: 1.4;
}

/* Selection limit hint rendered after the last option in bold */
.sel-limit-hint {
    font-size: 0.82rem;
    margin: 8px 0 0;
    color: #444;
}

/* ═══════════════════════════════════════════════════════════════
   Registration Page — Duplicate Check Message
   ═══════════════════════════════════════════════════════════════ */

.reg-duplicate-msg {
    font-size: 0.8rem;
    margin-top: 5px;
    padding: 5px 10px;
    border-radius: 4px;
}

.reg-dup-error {
    color: #842029;
    background: #f8d7da;
    border: 1px solid #f5c2c7;
}

.reg-dup-warn {
    color: #664d03;
    background: #fff3cd;
    border: 1px solid #ffecb5;
}

/* ═══════════════════════════════════════════════════════════════
   Registration Page — File Upload Notice Card
   ═══════════════════════════════════════════════════════════════ */

/* ── Notice Card ─────────────────────────────────────────────── */

.upload-notice {
    border-radius: 12px;
    border: 1.5px solid;
    padding: 14px 16px;
    margin-top: 12px;
    margin-bottom: 4px;
    transition: box-shadow 0.18s ease;
}

.upload-notice:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.upload-notice--required {
    background: rgba(13, 110, 253, 0.03);
    border-color: rgba(13, 110, 253, 0.2);
}

.upload-notice--optional {
    background: rgba(108, 117, 125, 0.03);
    border-color: rgba(108, 117, 125, 0.18);
}

/* ── Header row ──────────────────────────────────────────────── */

.upload-notice__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.upload-notice__left {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
}

.upload-notice__icon-wrap {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.upload-notice--required .upload-notice__icon-wrap {
    background: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
}

.upload-notice--optional .upload-notice__icon-wrap {
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
}

.upload-notice__title-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.upload-notice__title {
    font-size: 0.875rem;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.3;
    margin: 0;
}

.upload-notice__badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 20px;
    width: fit-content;
    line-height: 1.5;
}

.upload-notice__badge--required {
    background: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
}

.upload-notice__badge--optional {
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
}

/* ── Info button ─────────────────────────────────────────────── */

.upload-notice__info-btn {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1.5px solid;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
    padding: 0;
}

.upload-notice__info-btn:hover {
    transform: scale(1.08);
}

.upload-notice--required .upload-notice__info-btn {
    color: #0d6efd;
    border-color: rgba(13, 110, 253, 0.3);
}

.upload-notice--required .upload-notice__info-btn:hover {
    background: rgba(13, 110, 253, 0.08);
}

.upload-notice--optional .upload-notice__info-btn {
    color: #6c757d;
    border-color: rgba(108, 117, 125, 0.28);
}

.upload-notice--optional .upload-notice__info-btn:hover {
    background: rgba(108, 117, 125, 0.07);
}

/* ── Meta row — ext tags + limits ────────────────────────────── */

.upload-notice__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.upload-notice__ext-tag {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 4px;
    line-height: 1.6;
}

.upload-notice--required .upload-notice__ext-tag {
    background: rgba(13, 110, 253, 0.08);
    color: #0a58ca;
}

.upload-notice--optional .upload-notice__ext-tag {
    background: rgba(108, 117, 125, 0.08);
    color: #5c636a;
}

.upload-notice__sep {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #ced4da;
    flex-shrink: 0;
}

.upload-notice__limit {
    font-size: 0.75rem;
    color: #6c757d;
    font-weight: 500;
}

/* ── Hub-level notice wrapper (outside topic area) ───────────── */

.hub-upload-notices {
    margin-bottom: 8px;
}

/* ── Topic-level notice wrapper (inside topic slot area) ─────── */

.topic-upload-notices {
    margin-bottom: 14px;
}

.topic-upload-notices .upload-notice {
    margin-top: 0;
    margin-bottom: 10px;
}

/* ═══════════════════════════════════════════════════════════════
   Upload Info Modal
   ═══════════════════════════════════════════════════════════════ */

.upload-modal .modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

.upload-modal .modal-header {
    padding: 22px 24px 16px;
    border-bottom: 1px solid #f0f1f3;
}

.upload-modal .modal-body {
    padding: 20px 24px 24px;
}

.upload-modal__title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 4px;
    line-height: 1.3;
}

.upload-modal__subtitle {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    margin: 0;
}

.upload-modal__subtitle--required {
    color: #0d6efd;
}

.upload-modal__subtitle--optional {
    color: #6c757d;
}

.upload-modal__section-label {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    color: #9ca3af;
    margin-bottom: 10px;
}

.upload-modal__desc {
    font-size: 0.875rem;
    color: #495057;
    line-height: 1.65;
    margin: 0;
}

.upload-modal__ext-chip {
    display: inline-flex;
    align-items: center;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 6px;
    background: rgba(13, 110, 253, 0.07);
    color: #0a58ca;
    border: 1.5px solid rgba(13, 110, 253, 0.15);
    line-height: 1;
}

.upload-modal__limit-card {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 10px;
    flex: 1;
    min-width: 0;
}

.upload-modal__limit-label {
    font-size: 0.72rem;
    color: #9ca3af;
    font-weight: 600;
    letter-spacing: 0.3px;
    margin: 0;
}

.upload-modal__limit-value {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0;
    line-height: 1.2;
}

.upload-modal__guidelines {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 0.84rem;
    color: #374151;
    line-height: 1.75;
    white-space: pre-wrap;
    border-left: 3px solid #0d6efd;
}

.upload-modal__section {
    margin-bottom: 22px;
}

.upload-modal__section:last-child {
    margin-bottom: 0;
}

/* ── Responsive ──────────────────────────────────────────────── */

@media (max-width: 576px) {
    .upload-notice {
        padding: 12px 13px;
    }

    .upload-notice__title {
        font-size: 0.83rem;
    }

    .upload-notice__icon-wrap {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .upload-modal .modal-header {
        padding: 18px 18px 14px;
    }

    .upload-modal .modal-body {
        padding: 16px 18px 20px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   Multi-File Upload (MFU) Widget
   ═══════════════════════════════════════════════════════════════ */

.mfu-wrapper {
    position: relative;
}

.mfu-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 26px 20px 22px;
    border: 2px dashed #d1d5db;
    border-radius: 10px;
    background: #fafbfc;
    cursor: pointer;
    transition: border-color .18s, background .18s;
    text-align: center;
    user-select: none;
    outline: none;
}

.mfu-zone:hover,
.mfu-zone:focus {
    border-color: #0d6efd;
    background: rgba(13, 110, 253, .04);
}

.mfu-zone__icon {
    font-size: 1.85rem;
    color: #adb5bd;
    transition: color .18s;
    line-height: 1;
}

.mfu-zone:hover .mfu-zone__icon,
.mfu-zone:focus .mfu-zone__icon {
    color: #0d6efd;
}

.mfu-zone__text {
    font-size: .875rem;
    font-weight: 600;
    color: #495057;
}

.mfu-zone__hint {
    font-size: .75rem;
    color: #9ca3af;
    word-break: break-word;
}

/* File list */
.mfu-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0;
    margin: 0;
}

.mfu-list:not(:empty) {
    margin-top: 10px;
}

/* Individual file card */
.mfu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #fff;
    border: 1.5px solid #e9ecef;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    transition: border-color .15s, box-shadow .15s;
}

.mfu-item:hover {
    border-color: #dee2e6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
}

.mfu-item__icon {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 1.1rem;
}

.mfu-item__meta {
    flex: 1;
    min-width: 0;
}

.mfu-item__name {
    font-size: .82rem;
    font-weight: 600;
    color: #1a1a2e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
    line-height: 1.3;
}

.mfu-item__size {
    font-size: .72rem;
    color: #9ca3af;
    margin: 2px 0 0;
    line-height: 1.2;
}

.mfu-item__remove {
    flex-shrink: 0;
    background: none;
    border: none;
    color: #ced4da;
    padding: 5px 6px;
    cursor: pointer;
    border-radius: 6px;
    font-size: .9rem;
    line-height: 1;
    transition: color .15s, background .15s;
}

.mfu-item__remove:hover {
    color: #dc3545;
    background: #fff5f5;
}

.mfu-item__bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    border-radius: 0 2px 0 0;
    background: linear-gradient(90deg, #0d6efd, #6ea8fe);
    width: 0;
    transition: width .4s ease;
}

/* Add-another button */
.mfu-add-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 7px 14px;
    font-size: .81rem;
    font-weight: 600;
    color: #0d6efd;
    background: rgba(13, 110, 253, .06);
    border: 1.5px solid rgba(13, 110, 253, .2);
    border-radius: 8px;
    cursor: pointer;
    line-height: 1.4;
    transition: background .15s, border-color .15s;
}

.mfu-add-btn:hover {
    background: rgba(13, 110, 253, .11);
    border-color: rgba(13, 110, 253, .35);
}

.mfu-add-btn i {
    font-size: .78rem;
}

/* ═══════════════════════════════════════════════════════════════
   Form Submit Progress Overlay
   ═══════════════════════════════════════════════════════════════ */

.reg-submit-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 30, .55);
    backdrop-filter: blur(3px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .25s;
    pointer-events: none;
}

.reg-submit-overlay.is-active {
    opacity: 1;
    pointer-events: all;
}

.reg-submit-overlay__card {
    background: #fff;
    border-radius: 16px;
    padding: 30px 32px 26px;
    text-align: center;
    min-width: 270px;
    max-width: 340px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .18);
}

.reg-submit-overlay__spinner {
    font-size: 2rem;
    color: #0d6efd;
    margin-bottom: 12px;
    display: inline-block;
    animation: mfu-spin 1s linear infinite;
}

@keyframes mfu-spin {
    to { transform: rotate(360deg); }
}

.reg-submit-overlay__title {
    font-size: .95rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 4px;
}

.reg-submit-overlay__sub {
    font-size: .78rem;
    color: #9ca3af;
    margin: 0 0 18px;
}

.reg-submit-overlay__track {
    height: 6px;
    border-radius: 10px;
    background: #e9ecef;
    overflow: hidden;
}

.reg-submit-overlay__fill {
    height: 100%;
    border-radius: 10px;
    background: linear-gradient(90deg, #0d6efd, #6ea8fe);
    width: 0;
    transition: width .4s ease;
}

@media (max-width: 576px) {
    .mfu-zone {
        padding: 18px 14px;
    }

    .mfu-zone__icon {
        font-size: 1.5rem;
    }

    .reg-submit-overlay__card {
        min-width: 240px;
        padding: 24px 20px 20px;
    }
}

/* ── Single-file temp-upload widget ─────────────────────────────────────────── */
.temp-upload-single {
    position: relative;
}
