/* UENR Staff Manager — Frontend Form Styles */

.uenr-form-wrap {
    max-width: 780px;
    margin: 0 auto;
    font-family: inherit;
}

.uenr-form-title {
    font-size: 1.6rem;
    margin-bottom: 6px;
    color: #1a1a1a;
}

.uenr-form-desc {
    color: #666;
    margin-bottom: 28px;
    font-size: 0.95rem;
}

.uenr-required-star {
    color: #c00;
}

/* Alert messages */
.uenr-alert {
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 24px;
    font-size: 0.95rem;
    border-left: 4px solid transparent;
}

.uenr-alert--success {
    background: #f0faf4;
    border-color: #2e8540;
    color: #1b5e2e;
}

.uenr-alert--error {
    background: #fff8f8;
    border-color: #c00;
    color: #8b0000;
}

/* Fieldsets */
.uenr-fieldset {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 24px;
}

.uenr-fieldset legend {
    font-size: 1rem;
    font-weight: 600;
    padding: 0 8px;
    color: #333;
}

/* Field rows */
.uenr-field-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.uenr-field {
    flex: 1;
    min-width: 220px;
}

.uenr-field--full {
    flex: 1 1 100%;
}

.uenr-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #444;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.uenr-field input[type="text"],
.uenr-field input[type="email"],
.uenr-field input[type="url"],
.uenr-field select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 0.95rem;
    color: #222;
    background: #fff;
    box-sizing: border-box;
    transition: border-color .15s, box-shadow .15s;
}

.uenr-field input:focus,
.uenr-field select:focus {
    border-color: #005ea2;
    box-shadow: 0 0 0 3px rgba(0, 94, 162, .15);
    outline: none;
}

.uenr-field input[type="file"] {
    padding: 6px 0;
    font-size: 0.9rem;
}

.uenr-field-hint {
    font-size: 0.8rem;
    color: #888;
    margin: 4px 0 0;
}

/* Current photo preview */
.uenr-current-photo {
    margin-bottom: 10px;
}

.uenr-current-photo img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #ddd;
    display: block;
    margin-bottom: 6px;
}

.uenr-current-photo .description {
    font-size: 0.8rem;
    color: #888;
    margin: 0;
}

/* Track toggle */
.uenr-track-toggle {
    gap: 12px;
    margin-bottom: 20px;
}

.uenr-track-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    background: #fff;
    transition: border-color .15s, background .15s, color .15s;
    user-select: none;
}

.uenr-track-label:hover {
    border-color: #005ea2;
}

.uenr-track-label.active {
    border-color: #005ea2;
    background: #f0f5fd;
    color: #003a73;
}

.uenr-track-label input[type="radio"] {
    margin: 0;
    accent-color: #005ea2;
}

.uenr-track-fields {
    padding-top: 4px;
}

/* Checkbox group */
.uenr-checkbox-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.uenr-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: normal;
    cursor: pointer;
}

.uenr-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #005ea2;
}

/* Footer */
.uenr-form-footer {
    text-align: center;
    padding: 8px 0 24px;
}

.uenr-btn {
    display: inline-block;
    padding: 12px 36px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background .15s, transform .1s;
}

.uenr-btn--primary {
    background: #005ea2;
    color: #fff;
}

.uenr-btn--primary:hover {
    background: #003a73;
}

.uenr-btn--primary:active {
    transform: scale(.98);
}

.uenr-btn:disabled {
    opacity: .6;
    cursor: not-allowed;
}

.uenr-form-note {
    margin-top: 12px;
    font-size: 0.82rem;
    color: #888;
}

/* Responsive */
@media (max-width: 580px) {
    .uenr-field-row {
        flex-direction: column;
    }
    .uenr-track-toggle {
        flex-direction: column;
    }
    .uenr-track-label {
        width: 100%;
    }
}

.uenr-alert--warning {
    background: #fff8e1;
    border-color: #f59e0b;
    color: #78350f;
}

.uenr-alert--info {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #1e3a5f;
}

.uenr-current-cv {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 12px;
}

.uenr-current-cv p {
    margin: 0 0 8px;
}

/* ── Publication repeater remove button ────────────────────────────────────── */
.uenr-btn-remove-pub {
    background: none;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    color: #b32d2e;
    font-size: 1.2rem;
    line-height: 1;
    padding: 4px 10px;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

.uenr-btn-remove-pub:hover {
    background: #fef2f2;
    border-color: #d63638;
}

.uenr-btn--secondary {
    background: #f9fafb;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background .15s;
}

.uenr-btn--secondary:hover {
    background: #e5e7eb;
}

/* ── Mode tabs (Submit New / Update Existing) ──────────────────────────── */
.uenr-mode-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 18px;
}

.uenr-mode-tab {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    padding: 10px 16px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    text-decoration: none;
    transition: color .15s, border-color .15s, background .15s;
    border-radius: 6px 6px 0 0;
}

.uenr-mode-tab:hover {
    color: #005ea2;
    background: #f5faff;
}

.uenr-mode-tab.is-active {
    color: #003a73;
    border-bottom-color: #005ea2;
    background: #fff;
    cursor: default;
}

.uenr-mode-tab:disabled {
    opacity: 1;
}

/* ── Drag-drop Photo Uploader ──────────────────────────────────────────── */
.uenr-photo-uploader {
    display: flex;
    gap: 18px;
    align-items: stretch;
    background: #fafbfc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px;
}

.uenr-photo-preview {
    flex: 0 0 120px;
    width: 120px;
    height: 120px;
    border-radius: 12px;
    background: #f0f2f5;
    border: 1px dashed #c8ccd1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.uenr-photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.uenr-photo-preview.has-image {
    border-style: solid;
}

.uenr-photo-placeholder {
    width: 56px;
    height: 56px;
    color: #9aa1a8;
}

.uenr-photo-drop {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 2px dashed #cbd5e0;
    border-radius: 10px;
    padding: 18px;
    text-align: center;
    transition: border-color .15s, background .15s;
    cursor: pointer;
}

.uenr-photo-drop:hover,
.uenr-photo-drop.is-dragover {
    border-color: #005ea2;
    background: #f0f6fc;
}

.uenr-photo-drop strong {
    color: #003a73;
}

.uenr-photo-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.uenr-photo-clear {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 0.78rem;
    cursor: pointer;
    z-index: 2;
}

.uenr-photo-clear:hover {
    background: #fef2f2;
    border-color: #d63638;
    color: #b32d2e;
}

@media (max-width: 580px) {
    .uenr-photo-uploader {
        flex-direction: column;
    }
    .uenr-photo-preview {
        align-self: center;
    }
}

/* ── CV Uploader ───────────────────────────────────────────────────────── */
.uenr-cv-drop {
    display: flex;
    align-items: center;
    gap: 14px;
    border: 2px dashed #cbd5e0;
    border-radius: 10px;
    padding: 14px 18px;
    background: #fafbfc;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}

.uenr-cv-drop:hover,
.uenr-cv-drop.is-dragover {
    border-color: #005ea2;
    background: #f0f6fc;
}

.uenr-cv-drop svg {
    color: #4b5563;
    flex-shrink: 0;
}

.uenr-cv-input {
    position: absolute;
    left: -9999px;
}

.uenr-cv-drop-text {
    flex: 1;
}

.uenr-cv-drop-text strong {
    color: #003a73;
}

.uenr-cv-filename {
    font-size: 0.82rem;
    color: #005ea2;
    font-weight: 600;
}

/* ── Mode tabs (Submit New / Update Existing) ──────────────────────────── */
.uenr-mode-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 18px;
}

.uenr-mode-tab {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    padding: 10px 16px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    text-decoration: none;
    transition: color .15s, border-color .15s, background .15s;
    border-radius: 6px 6px 0 0;
}

.uenr-mode-tab:hover {
    color: #005ea2;
    background: #f5faff;
}

.uenr-mode-tab.is-active {
    color: #003a73;
    border-bottom-color: #005ea2;
    background: #fff;
    cursor: default;
}

.uenr-mode-tab:disabled {
    opacity: 1;
}

/* ── Drag-drop Photo Uploader ──────────────────────────────────────────── */
.uenr-photo-uploader {
    display: flex;
    gap: 18px;
    align-items: stretch;
    background: #fafbfc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px;
}

.uenr-photo-preview {
    flex: 0 0 120px;
    width: 120px;
    height: 120px;
    border-radius: 12px;
    background: #f0f2f5;
    border: 1px dashed #c8ccd1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.uenr-photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.uenr-photo-preview.has-image {
    border-style: solid;
}

.uenr-photo-placeholder {
    width: 56px;
    height: 56px;
    color: #9aa1a8;
}

.uenr-photo-drop {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 2px dashed #cbd5e0;
    border-radius: 10px;
    padding: 18px;
    text-align: center;
    transition: border-color .15s, background .15s;
    cursor: pointer;
}

.uenr-photo-drop:hover,
.uenr-photo-drop.is-dragover {
    border-color: #005ea2;
    background: #f0f6fc;
}

.uenr-photo-drop strong {
    color: #003a73;
}

.uenr-photo-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.uenr-photo-clear {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 0.78rem;
    cursor: pointer;
    z-index: 2;
}

.uenr-photo-clear:hover {
    background: #fef2f2;
    border-color: #d63638;
    color: #b32d2e;
}

@media (max-width: 580px) {
    .uenr-photo-uploader {
        flex-direction: column;
    }
    .uenr-photo-preview {
        align-self: center;
    }
}

/* ── CV Uploader ───────────────────────────────────────────────────────── */
.uenr-cv-drop {
    display: flex;
    align-items: center;
    gap: 14px;
    border: 2px dashed #cbd5e0;
    border-radius: 10px;
    padding: 14px 18px;
    background: #fafbfc;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    position: relative;
}

.uenr-cv-drop:hover,
.uenr-cv-drop.is-dragover {
    border-color: #005ea2;
    background: #f0f6fc;
}

.uenr-cv-drop svg {
    color: #4b5563;
    flex-shrink: 0;
}

.uenr-cv-input {
    position: absolute;
    left: -9999px;
}

.uenr-cv-drop-text {
    flex: 1;
}

.uenr-cv-drop-text strong {
    color: #003a73;
}

.uenr-cv-filename {
    font-size: 0.82rem;
    color: #005ea2;
    font-weight: 600;
}
