/* Student User/Edit — simpliTrain v2 (scoped under .user-edit-page) */

.user-edit-page {
    --brand: #4F46E5;
    --brand-dark: #3730A3;
    --brand-light: #EEF2FF;
    --surface-bg: #DDE2EC;
    --surface-card: #FFFFFF;
    --surface-border: #C8D0DF;
    --surface-hover: #F0F2F8;
    --text-primary: #0F172A;
    --text-secondary: #374151;
    --text-muted: #475569;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-full: 9999px;
    --shadow-sm: 0 1px 4px rgba(0, 0, 0, .06);
    --transition: 0.15s ease;
    width: 100%;
    box-sizing: border-box;
}

.user-edit-page *,
.user-edit-page *::before,
.user-edit-page *::after {
    box-sizing: border-box;
}

.user-edit-page.sl-page {
    padding: 20px 24px 32px;
    max-width: 100%;
}

.page-user-edit.main-wrapper,
.main-wrapper.page-user-edit {
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: none !important;
}

.page-user-edit .main-container.user-edit-page {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    max-width: none;
    margin: 0;
}

/* Back link */
.user-edit-page .ce-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 12px;
    transition: color var(--transition);
}

.user-edit-page .ce-back-link:hover {
    color: var(--text-primary);
    text-decoration: none;
}

.user-edit-page .ce-back-link svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

[dir="rtl"] .user-edit-page .ce-back-link svg {
    transform: scaleX(-1);
}

/* Hero — plain teal to match profile page */
.user-edit-page .enr-hero {
    background: #0d9488;
    color: #fff;
    padding: 24px 28px;
    /* border-radius: var(--radius-lg); */
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    position: relative;
    overflow: hidden;
    flex-wrap: wrap;
}

.user-edit-page .enr-hero__left {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1 1 auto;
    min-width: 0;
}

.user-edit-page .enr-hero__avatar-wrap {
    flex-shrink: 0;
}

.user-edit-page .enr-hero__image-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.user-edit-page .enr-hero__image-actions #removeProfileImageDiv {
    display: inline-flex;
}

.user-edit-page #userProfileImageEdit .defaultImage,
.user-edit-page #userProfileImageEdit .userImage {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    margin: 0;
    border: 3px solid rgba(255, 255, 255, .45);
    background-color: rgba(255, 255, 255, .18);
}

.user-edit-page #userProfileImageEdit .defaultImage {
    background-image: url("/images/UserProfile.png");
}

.user-edit-page #userProfileImageEdit .imageUploading {
    width: 68px;
    height: 68px;
    margin: 0;
    background: url("/images/ajax-loader.gif") center center no-repeat;
    background-size: cover;
    border-radius: 50%;
}

.user-edit-page .enr-hero .btn-hero.uploadLink-s::before,
.user-edit-page .enr-hero .btn-hero.deleteLink-s::before {
    display: none !important;
}

.user-edit-page .enr-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.user-edit-page .btn-hero {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none !important;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .4);
    color: #fff !important;
    white-space: nowrap;
    cursor: pointer;
    transition: background .15s;
}

.user-edit-page .btn-hero:hover {
    background: rgba(255, 255, 255, .15);
    color: #fff !important;
}

/* Tabs */
.user-edit-page .enr-layout {
    display: block;
}

.user-edit-page .ce-tabs-wrap {
    margin-bottom: 0;
}

.user-edit-page .ce-tabs-header,
.user-edit-page .ue-tabs-header {
    display: flex;
    align-items: flex-end;    
    padding-left: 4px;
    padding-right: 4px;
    width: 100%;
    overflow: visible;
}

.user-edit-page .sl-tabs {
    display: flex;
    background: transparent;
    border: none;
    padding: 0;
    overflow-x: auto;
    align-items: flex-end;
    margin-bottom: 0;
    gap: 0;
    width: 100%;
    -webkit-overflow-scrolling: touch;
}

.user-edit-page .sl-tabs::-webkit-scrollbar {
    display: none;
}

.user-edit-page .sl-tab {
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #94a3b8;
    border-bottom: 1px solid #64748b;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    padding: 11px 20px;
    margin-right: 4px;
    margin-bottom: -1px;
    font-size: 14px;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1.2;
    z-index: 1;
}

.user-edit-page .sl-tab svg {
    flex-shrink: 0;
}

.user-edit-page .sl-tab__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: var(--radius-full);
    background: var(--brand-light);
    color: var(--brand);
    font-size: 11px;
    font-weight: 700;
}

.user-edit-page .sl-tab:hover {
    background: #f1f5f9;
    color: var(--text-primary);
}

.user-edit-page #liInterestsTab {
    display: inline-flex !important;
}

.user-edit-page #liInterestsTab.ue-tab-hidden {
    display: none !important;
}

.user-edit-page .sl-tab[data-ue-tab="basic"] { border-top: 3px solid #7c3aed; }
.user-edit-page .sl-tab[data-ue-tab="interests"] { border-top: 3px solid #14b8a6; }

.user-edit-page .sl-tab.sl-tab--active {
    font-weight: 600;
    padding-top: 14px;
    padding-bottom: 14px;
    border: 1px solid #64748b !important;
    border-bottom: 1px solid #fff !important;
    margin-bottom: -1px;
    z-index: 3;
    background: #fff !important;
}

.user-edit-page .sl-tab[data-ue-tab="basic"].sl-tab--active {
    border-top: 5px solid #7c3aed !important;
    color: #7c3aed;
}

.user-edit-page .sl-tab[data-ue-tab="interests"].sl-tab--active {
    border-top: 5px solid #14b8a6 !important;
    color: #14b8a6;
}

.user-edit-page .sl-pane {
    display: none;
}

.user-edit-page .sl-pane.sl-pane--active {
    display: block;
    border: 1px solid #64748b;
    border-top: 1px solid #64748b;
    background: #fff;
    padding: 24px;
    margin-top: -1px;
    position: relative;
    z-index: 2;
}

.user-edit-page .sl-pane[hidden] {
    display: none !important;
}

.user-edit-page .ue-pane-inner {
    width: 100%;
}

/* Form fields */
.user-edit-page table.fields {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.user-edit-page table.fields td.fieldName {
    width: 220px;
    min-width: 140px;
    padding: 8px 12px 8px 0;
    text-align: right;
    color: var(--text-secondary);
    font-weight: 500;
    vertical-align: top;
}

.user-edit-page table.fields td:not(.fieldName) {
    padding: 8px 0;
    vertical-align: top;
}

.user-edit-page #bioInfoTable .bioCertification,
.user-edit-page #bioInfoTable .bioSpecialty,
.user-edit-page #bioInfoTable .bioFieldValue {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: min(100%, 560px);
    box-sizing: border-box;
}

.user-edit-page #bioInfoTable .bioCertification input[type="text"],
.user-edit-page #bioInfoTable .bioSpecialty input[type="text"],
.user-edit-page #bioInfoTable .bioFieldValue input[type="text"] {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    max-width: none;
    margin: 0;
}

.user-edit-page #bioInfoTable .bioCertification .remove,
.user-edit-page #bioInfoTable .bioSpecialty .remove,
.user-edit-page #bioInfoTable .bioFieldValue .remove {
    flex: 0 0 auto;
    align-self: center;
}

.user-edit-page .user-edit-save-actions {
    text-align: center;
    margin: 24px 0 32px;
    padding-bottom: 16px;
}

.user-edit-page .user-edit-save-actions input.save.button {
    background-color: #0096eb !important;
    background-image: none !important;
    border: none !important;
    color: #fff !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    padding: 8px 28px !important;
    min-width: 120px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 150, 235, 0.35);
}

.user-edit-page .user-edit-save-actions input.save.button:hover {
    background-color: #0088d4 !important;
}

/* Bio image */
.user-edit-page #userBioImageEdit .bioImage,
.user-edit-page #userBioImageEdit .defaultBioImage {
    width: 120px;
    height: 120px;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
}

.user-edit-page #userBioImageEdit .defaultBioImage {
    background-image: url("/images/User.png");
}

.user-edit-page #userBioImageEdit .bioImageUploading {
    width: 120px;
    height: 120px;
    background: url("/images/ajax-loader.gif") center center no-repeat;
}

.user-edit-page ul.customCheckboxList {
    margin: 0;
    padding: 0;
}

.user-edit-page ul.customCheckboxList li {
    margin: 0;
    padding: 0;
    list-style: none;
}

.user-edit-page .interest {
    margin-bottom: 10px;
}

.user-edit-page .interestGroup {
    float: left;
    margin-right: 80px;
    margin-bottom: 10px;
}

.user-edit-page #additionalInterests {
    clear: both;
}

/* Interests tab — empty state */
.user-edit-page #noAdditionalInterests {
    width: 100%;
}

.user-edit-page .sl-empty.sl-empty--interests {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 56px 24px;
    min-height: 280px;
    width: 100%;
    background: #eef1f6;
    border-radius: var(--radius-md);
    box-sizing: border-box;
}

.user-edit-page .sl-empty--interests .sl-empty__icon {
    width: 80px;
    height: 80px;
    margin: 0 0 20px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none'%3E%3Cpath d='M44 12a28 28 0 0 1 10 20' stroke='%23475569' stroke-width='2.5' stroke-linecap='round'/%3E%3Cpath d='M54 32l4-2-2-4' stroke='%23475569' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M10 32c6-10 14-16 22-16s16 6 22 16c-6 10-14 16-22 16S16 42 10 32z' stroke='%23475569' stroke-width='2.5' stroke-linejoin='round'/%3E%3Ccircle cx='32' cy='32' r='7' fill='%23475569'/%3E%3C/svg%3E") center/contain no-repeat;
}

.user-edit-page .sl-empty--interests .sl-empty__title {
    font-size: 16px;
    font-weight: 700;
    color: #1e3a5f;
    margin: 0;
    line-height: 1.35;
}

.user-edit-page .flag_i {
    position: absolute;
    cursor: pointer;
    opacity: 0.6;
}

.user-edit-page .flagged {
    opacity: 1;
    color: #e00;
}

/* Basic registration */
.user-edit-page.is-basic-registration .ue-tabs-header,
.user-edit-page.is-basic-registration .sl-tabs {
    display: none !important;
}

.user-edit-page.is-basic-registration .notForBasicRegistration {
    display: none !important;
}

.user-edit-page.is-basic-registration .validation-summary-valid {
    display: none !important;
}

.user-edit-page.is-basic-registration .sl-pane.sl-pane--active {
    border: none;
    padding: 0;
}

/* RTL */
[dir="rtl"] .user-edit-page table.fields td.fieldName {
    text-align: left;
    padding: 8px 0 8px 12px;
}

[dir="rtl"] .user-edit-page .sl-tab {
    margin-right: 0;
    margin-left: 4px;
}

/* Responsive */
@media (max-width: 768px) {
    .user-edit-page .sl-tabs {
        flex-direction: column;
        border-bottom: none;
        gap: 4px;
    }

    .user-edit-page .sl-tab {
        width: 100%;
        border-radius: var(--radius-md) !important;
        border: 1px solid #e2e8f0 !important;
        border-inline-start: 4px solid transparent !important;
        border-top: none !important;
        margin-right: 0;
        margin-bottom: 0;
        padding: 11px 16px !important;
        white-space: normal;
    }

    .user-edit-page .sl-tab[data-ue-tab="basic"] { border-inline-start-color: #7c3aed !important; }
    .user-edit-page .sl-tab[data-ue-tab="interests"] { border-inline-start-color: #14b8a6 !important; }

    .user-edit-page .sl-tab.sl-tab--active {
        border-bottom: 1px solid #e2e8f0 !important;
    }

    .user-edit-page .sl-tab[data-ue-tab="basic"].sl-tab--active {
        border-inline-start: 5px solid #7c3aed !important;
    }

    .user-edit-page .sl-tab[data-ue-tab="interests"].sl-tab--active {
        border-inline-start: 5px solid #14b8a6 !important;
    }

    .user-edit-page .sl-pane.sl-pane--active {
        border-radius: 0 0 var(--radius-md) var(--radius-md);
        margin-top: 8px;
    }

    .user-edit-page table.fields,
    .user-edit-page table.fields tbody,
    .user-edit-page table.fields tr,
    .user-edit-page table.fields td {
        display: block;
        width: 100%;
    }

    .user-edit-page table.fields td.fieldName {
        text-align: left;
        padding-bottom: 4px;
        width: 100%;
        max-width: none;
    }

    .user-edit-page .enr-hero {
        flex-direction: column;
        align-items: stretch;
    }

    .user-edit-page .enr-hero__left {
        flex-wrap: wrap;
        justify-content: center;
    }

    .user-edit-page .enr-hero__image-actions {
        justify-content: center;
    }

    .user-edit-page .enr-hero__actions {
        justify-content: center;
        flex: 1 1 100%;
    }

    .user-edit-page .interestGroup {
        float: none;
        margin-right: 0;
    }
}

@media (max-width: 640px) {
    .user-edit-page.sl-page {
        padding: 16px 16px 24px;
    }

    .user-edit-page .enr-hero {
        padding: 16px 20px;
    }

    .user-edit-page .enr-hero h1 {
        font-size: 16px;
    }
}
