/* =========================================================
   FUTUREVERSE — EDIT PROFILE
   PREMIUM MOBILE-FIRST DESIGN
========================================================= */


/* =========================================================
   01. ROOT VARIABLES
========================================================= */

:root {

    --primary: #4f46e5;
    --primary-dark: #3730a3;
    --primary-light: #eef2ff;

    --blue: #2563eb;
    --blue-light: #eff6ff;

    --green: #16a34a;
    --green-light: #f0fdf4;

    --orange: #f97316;
    --orange-light: #fff7ed;

    --text-main: #111827;
    --text-secondary: #4b5563;
    --text-muted: #6b7280;

    --border: #e5e7eb;
    --border-light: #eef0f4;

    --surface: #ffffff;
    --background: #f7f9fc;

    --danger: #dc2626;
    --danger-light: #fef2f2;

    --shadow-sm:
        0 2px 8px rgba(15, 23, 42, 0.05);

    --shadow-md:
        0 8px 25px rgba(15, 23, 42, 0.08);

    --shadow-lg:
        0 18px 45px rgba(15, 23, 42, 0.11);

    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;

}


/* =========================================================
   02. RESET
========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
}


body {

    min-height: 100vh;

    font-family:
        "Poppins",
        sans-serif;

    background:
        linear-gradient(
            180deg,
            #f8faff 0%,
            #f5f7fb 100%
        );

    color: var(--text-main);

    -webkit-font-smoothing: antialiased;

}


button,
input,
select,
textarea {

    font: inherit;

}


button,
a {

    -webkit-tap-highlight-color:
        transparent;

}


a {

    text-decoration: none;

}


button {

    border: 0;

    cursor: pointer;

}


/* =========================================================
   03. MAIN PAGE
========================================================= */

.edit-profile-page {

    width: 100%;

    min-height: 100vh;

    padding-bottom: 40px;

}


/* =========================================================
   04. TOP HEADER
========================================================= */

.edit-profile-header {

    position: sticky;

    top: 0;

    z-index: 100;

    width: 100%;

    min-height: 72px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 16px;

    padding:
        12px
        16px;

    background:
        rgba(255, 255, 255, 0.94);

    border-bottom:
        1px solid
        rgba(229, 231, 235, 0.85);

    backdrop-filter:
        blur(16px);

    -webkit-backdrop-filter:
        blur(16px);

}


.header-left {

    min-width: 0;

    display: flex;

    align-items: center;

    gap: 12px;

}


.back-button {

    flex: 0 0 auto;

    width: 42px;

    height: 42px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 13px;

    background:
        var(--primary-light);

    color:
        var(--primary);

    font-size: 16px;

    transition:
        0.2s ease;

}


.back-button:active {

    transform:
        scale(0.94);

}


.header-title {

    min-width: 0;

}


.header-title > span {

    display: block;

    margin-bottom: 2px;

    color:
        var(--primary);

    font-size: 9px;

    font-weight: 700;

    letter-spacing:
        1.2px;

}


.header-title h1 {

    font-size: 18px;

    line-height: 1.25;

    font-weight: 700;

    white-space: nowrap;

}


.header-brand {

    display: none;

    align-items: center;

    gap: 9px;

}


.brand-logo {

    width: 38px;

    height: 38px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 11px;

    background:
        linear-gradient(
            135deg,
            #4f46e5,
            #2563eb
        );

    color: #fff;

    font-size: 12px;

    font-weight: 700;

    box-shadow:
        0 6px 16px
        rgba(79, 70, 229, 0.25);

}


.brand-text {

    display: flex;

    flex-direction: column;

}


.brand-text strong {

    font-size: 14px;

    line-height: 1.1;

}


.brand-text strong span {

    color:
        var(--primary);

}


.brand-text small {

    margin-top: 3px;

    color:
        var(--text-muted);

    font-size: 7px;

    font-weight: 700;

    letter-spacing:
        1px;

}


/* =========================================================
   05. PAGE INTRO
========================================================= */

.edit-profile-intro {

    width: calc(100% - 28px);

    max-width: 1100px;

    margin:
        18px auto
        14px;

    padding: 18px;

    display: flex;

    align-items: flex-start;

    gap: 14px;

    border:
        1px solid
        #e4e8f3;

    border-radius:
        var(--radius-lg);

    background:
        linear-gradient(
            135deg,
            #ffffff 0%,
            #f5f7ff 100%
        );

    box-shadow:
        var(--shadow-sm);

}


.intro-icon {

    flex: 0 0 auto;

    width: 46px;

    height: 46px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 14px;

    background:
        linear-gradient(
            135deg,
            #eef2ff,
            #e0e7ff
        );

    color:
        var(--primary);

    font-size: 18px;

}


.intro-content {

    min-width: 0;

}


.intro-label {

    display: block;

    margin-bottom: 3px;

    color:
        var(--primary);

    font-size: 9px;

    font-weight: 700;

    letter-spacing:
        1px;

}


.intro-content h2 {

    font-size: 19px;

    line-height: 1.3;

    font-weight: 700;

}


.intro-content p {

    margin-top: 4px;

    color:
        var(--text-muted);

    font-size: 11px;

    line-height: 1.55;

}


/* =========================================================
   06. FORM
========================================================= */

.edit-profile-form {

    width: calc(100% - 28px);

    max-width: 1100px;

    margin: 0 auto;

}


.profile-edit-section {

    margin-bottom: 16px;

    padding: 18px;

    background:
        var(--surface);

    border:
        1px solid
        var(--border-light);

    border-radius:
        var(--radius-lg);

    box-shadow:
        var(--shadow-sm);

}


/* =========================================================
   07. SECTION HEADING
========================================================= */

.section-heading {

    display: flex;

    align-items: flex-start;

    gap: 12px;

    margin-bottom: 20px;

}


.section-icon {

    flex: 0 0 auto;

    width: 42px;

    height: 42px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 12px;

    background:
        var(--primary-light);

    color:
        var(--primary);

    font-size: 16px;

}


.section-heading > div:last-child {

    min-width: 0;

}


.section-heading > div:last-child > span {

    display: block;

    margin-bottom: 3px;

    color:
        var(--primary);

    font-size: 8px;

    font-weight: 700;

    letter-spacing:
        1px;

}


.section-heading h2 {

    font-size: 16px;

    line-height: 1.35;

    font-weight: 700;

}


.section-heading p {

    margin-top: 3px;

    color:
        var(--text-muted);

    font-size: 10px;

    line-height: 1.5;

}


/* =========================================================
   08. FORM GRID
========================================================= */

.edit-form-grid {

    display: grid;

    grid-template-columns:
        1fr;

    gap: 16px;

}


.edit-form-group {

    min-width: 0;

}


.edit-form-group.full-width {

    grid-column:
        1 / -1;

}


.edit-form-group label {

    min-height: 18px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 8px;

    margin-bottom: 7px;

    color:
        var(--text-main);

    font-size: 11px;

    font-weight: 600;

}


.required {

    margin-left: 2px;

    color:
        var(--danger);

}


/* =========================================================
   09. INPUT WRAPPER
========================================================= */

.edit-input-wrapper {

    position: relative;

    width: 100%;

}


.edit-input-wrapper > i {

    position: absolute;

    top: 50%;

    left: 14px;

    z-index: 2;

    transform:
        translateY(-50%);

    color:
        #9ca3af;

    font-size: 13px;

    pointer-events: none;

}


.edit-input-wrapper input,
.edit-input-wrapper select {

    width: 100%;

    min-height: 48px;

    padding:
        0 40px
        0 40px;

    border:
        1px solid
        #dfe3eb;

    border-radius:
        12px;

    outline: none;

    background:
        #fbfcfe;

    color:
        var(--text-main);

    font-size: 12px;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;

}


.edit-input-wrapper input::placeholder {

    color:
        #a1a7b2;

}


.edit-input-wrapper input:focus,
.edit-input-wrapper select:focus {

    border-color:
        var(--primary);

    background:
        #ffffff;

    box-shadow:
        0 0 0 4px
        rgba(79, 70, 229, 0.08);

}


/* =========================================================
   10. SELECT
========================================================= */

.select-wrapper select {

    appearance: none;

    -webkit-appearance: none;

    cursor: pointer;

    padding-right: 42px;

}


.select-wrapper > i {

    left: auto;

    right: 14px;

    color:
        #9ca3af;

}


/* =========================================================
   11. LOCKED FIELDS
========================================================= */

.locked-label {

    display: inline-flex;

    align-items: center;

    gap: 4px;

    padding:
        3px 7px;

    border-radius: 20px;

    background:
        #f3f4f6;

    color:
        #6b7280;

    font-size: 8px;

    font-weight: 600;

}


.locked-input input,
.locked-input select {

    cursor: not-allowed;

    background:
        #f3f4f6;

    color:
        #6b7280;

    border-color:
        #e5e7eb;

}


.locked-input > i {

    color:
        #9ca3af;

}


.field-hint {

    display: block;

    margin-top: 5px;

    color:
        var(--text-muted);

    font-size: 9px;

    line-height: 1.4;

}


/* =========================================================
   12. FIELD ERRORS
========================================================= */

.field-error {

    display: block;

    min-height: 0;

    margin-top: 5px;

    color:
        var(--danger);

    font-size: 9px;

    line-height: 1.4;

}


/* =========================================================
   13. CURRENT SELECTION HINT
========================================================= */

.selection-hint {

    display: block;

    min-height: 0;

    margin-top: 6px;

    color:
        var(--primary);

    font-size: 9px;

    font-weight: 500;

    line-height: 1.4;

}


/* =========================================================
   13. CHOICE OPTIONS
========================================================= */

.choice-options {

    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 8px;

}


.choice-card {

    position: relative;

    min-height: 48px;

    display: flex !important;

    align-items: center;

    justify-content: center;

    gap: 7px;

    margin: 0 !important;

    padding: 9px;

    border:
        1px solid
        #e2e5eb;

    border-radius:
        11px;

    background:
        #fbfcfe;

    color:
        var(--text-secondary) !important;

    font-size: 10px !important;

    font-weight: 600 !important;

    cursor: pointer;

    transition:
        0.2s ease;

}


.choice-card input {

    position: absolute;

    opacity: 0;

    pointer-events: none;

}


.choice-icon {

    width: 25px;

    height: 25px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 8px;

    background:
        #eef2ff;

    color:
        var(--primary);

    font-size: 11px;

}


.choice-card:has(input:checked) {

    border-color:
        var(--primary);

    background:
        #f5f3ff;

    color:
        var(--primary) !important;

    box-shadow:
        0 0 0 3px
        rgba(79, 70, 229, 0.07);

}


/* =========================================================
   14. SKILLS
========================================================= */

.skills-options {

    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 8px;

}


.skill-card {

    position: relative;

    min-height: 45px;

    display: flex !important;

    align-items: center;

    justify-content: center;

    margin: 0 !important;

    padding: 8px;

    border:
        1px solid
        #e2e5eb;

    border-radius:
        11px;

    background:
        #fbfcfe;

    color:
        var(--text-secondary) !important;

    font-size: 10px !important;

    font-weight: 600 !important;

    cursor: pointer;

    transition:
        0.2s ease;

}


.skill-card input {

    position: absolute;

    opacity: 0;

    pointer-events: none;

}


.skill-card:has(input:checked) {

    border-color:
        var(--primary);

    background:
        var(--primary-light);

    color:
        var(--primary) !important;

}


/* =========================================================
   15. TEACHING LEVEL
========================================================= */

.level-options {

    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 8px;

}


.level-card {

    position: relative;

    min-height: 48px;

    display: flex !important;

    align-items: center;

    justify-content: center;

    margin: 0 !important;

    padding: 7px;

    border:
        1px solid
        #e2e5eb;

    border-radius:
        11px;

    background:
        #fbfcfe;

    color:
        var(--text-secondary) !important;

    font-size: 9px !important;

    font-weight: 600 !important;

    text-align: center;

    cursor: pointer;

    transition:
        0.2s ease;

}


.level-card input {

    position: absolute;

    opacity: 0;

    pointer-events: none;

}


.level-card:has(input:checked) {

    border-color:
        var(--primary);

    background:
        var(--primary-light);

    color:
        var(--primary) !important;

}


/* =========================================================
   16. TEXTAREA
========================================================= */

.textarea-wrapper {

    position: relative;

}


.textarea-wrapper textarea {

    width: 100%;

    min-height: 145px;

    padding:
        14px;

    resize: vertical;

    border:
        1px solid
        #dfe3eb;

    border-radius:
        12px;

    outline: none;

    background:
        #fbfcfe;

    color:
        var(--text-main);

    font-size: 12px;

    line-height: 1.6;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;

}


.textarea-wrapper textarea::placeholder {

    color:
        #a1a7b2;

}


.textarea-wrapper textarea:focus {

    border-color:
        var(--primary);

    background:
        #ffffff;

    box-shadow:
        0 0 0 4px
        rgba(79, 70, 229, 0.08);

}


.character-counter {

    position: absolute;

    right: 11px;

    bottom: 9px;

    padding:
        3px 7px;

    border-radius: 7px;

    background:
        rgba(255, 255, 255, 0.9);

    color:
        #8b93a1;

    font-size: 8px;

    pointer-events: none;

}


/* =========================================================
   17. SAVE SECTION
========================================================= */

.profile-save-section {

    margin-top: 4px;

    padding: 16px;

    border:
        1px solid
        #e1e6f0;

    border-radius:
        var(--radius-lg);

    background:
        linear-gradient(
            135deg,
            #ffffff,
            #f7f9ff
        );

    box-shadow:
        var(--shadow-sm);

}


.save-info {

    display: flex;

    align-items: flex-start;

    gap: 10px;

    margin-bottom: 15px;

}


.save-info-icon {

    flex: 0 0 auto;

    width: 34px;

    height: 34px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 10px;

    background:
        var(--green-light);

    color:
        var(--green);

    font-size: 13px;

}


.save-info strong {

    display: block;

    color:
        var(--text-main);

    font-size: 10px;

}


.save-info p {

    margin-top: 2px;

    color:
        var(--text-muted);

    font-size: 9px;

    line-height: 1.45;

}


/* =========================================================
   18. ACTION BUTTONS
========================================================= */

.form-actions {

    display: grid;

    grid-template-columns:
        1fr 1.5fr;

    gap: 9px;

}


.cancel-button,
.save-button {

    min-height: 48px;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 7px;

    border-radius:
        12px;

    font-size: 11px;

    font-weight: 600;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;

}


.cancel-button {

    border:
        1px solid
        #dfe3eb;

    background:
        #ffffff;

    color:
        var(--text-secondary);

}


.save-button {

    position: relative;

    background:
        linear-gradient(
            135deg,
            #4f46e5,
            #2563eb
        );

    color:
        #ffffff;

    box-shadow:
        0 8px 18px
        rgba(79, 70, 229, 0.22);

}


.cancel-button:active,
.save-button:active {

    transform:
        scale(0.97);

}


.button-loading {

    display: inline-flex;

    align-items: center;

    gap: 6px;

}


/* Hidden elements must stay hidden */
.button-loading[hidden] {

    display: none !important;

}
.edit-toast[hidden] {

    display: none !important;

}

/* Save button should show only its active content */
.save-button > .fa-check {

    display: none;

}


/* =========================================================
   19. PROFILE UPDATE TOAST
========================================================= */

.edit-toast {

    position: fixed;

    top: 18px;

    right: 18px;

    z-index: 1200;

    width:
        min(
            calc(100% - 36px),
            360px
        );

    min-height: 64px;

    display: flex;

    align-items: center;

    gap: 11px;

    padding:
        11px 14px;

    border:
        1px solid
        rgba(255,255,255,0.85);

    border-radius:
        14px;

    background:
        rgba(255,255,255,0.97);

    box-shadow:
        0 16px 40px
        rgba(15,23,42,0.18);

    backdrop-filter:
        blur(14px);

    -webkit-backdrop-filter:
        blur(14px);

    animation:
        editToastIn
        0.28s
        ease
        both;

}

.edit-toast-icon {

    flex: 0 0 auto;

    width: 34px;

    height: 34px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius:
        10px;

    background:
        var(--green-light);

    color:
        var(--green);

    font-size: 15px;

}

.edit-toast-content {

    min-width: 0;

    display: flex;

    flex-direction: column;

    gap: 2px;

}

.edit-toast-content strong {

    color:
        var(--text-main);

    font-size: 11px;

    font-weight: 700;

}

.edit-toast-content span {

    color:
        var(--text-muted);

    font-size: 9px;

    line-height: 1.4;

}

.edit-toast.error .edit-toast-icon {

    background:
        var(--danger-light);

    color:
        var(--danger);

}

@keyframes editToastIn {

    from {

        opacity: 0;

        transform:
            translate3d(
                28px,
                -8px,
                0
            );

    }

    to {

        opacity: 1;

        transform:
            translate3d(
                0,
                0,
                0
            );

    }

}


/* =========================================================
   20. TABLET
========================================================= */

@media (min-width: 600px) {

    .edit-profile-header {

        padding:
            14px 28px;

    }


    .edit-profile-intro,
    .edit-profile-form {

        width:
            calc(100% - 48px);

    }


    .profile-edit-section {

        padding: 24px;

    }


    .edit-form-grid {

        grid-template-columns:
            repeat(2, 1fr);

    }


    .choice-options {

        grid-template-columns:
            repeat(2, 1fr);

    }


    .skills-options {

        grid-template-columns:
            repeat(3, 1fr);

    }


    .header-title h1 {

        font-size: 20px;

    }


    .intro-content h2 {

        font-size: 21px;

    }

}


/* =========================================================
   21. DESKTOP
========================================================= */

@media (min-width: 900px) {

    .edit-profile-page {

        padding-bottom: 70px;

    }


    .edit-profile-header {

        min-height: 76px;

        padding:
            14px 42px;

    }


    .header-brand {

        display: flex;

    }


    .edit-profile-intro {

        margin-top: 30px;

        padding: 25px 28px;

    }


    .intro-icon {

        width: 54px;

        height: 54px;

        border-radius: 16px;

        font-size: 20px;

    }


    .intro-content h2 {

        font-size: 24px;

    }


    .intro-content p {

        font-size: 12px;

    }


    .profile-edit-section {

        padding: 28px;

        margin-bottom: 20px;

    }


    .section-heading {

        margin-bottom: 24px;

    }


    .section-icon {

        width: 48px;

        height: 48px;

        border-radius: 14px;

    }


    .section-heading h2 {

        font-size: 18px;

    }


    .section-heading p {

        font-size: 11px;

    }


    .edit-form-grid {

        gap: 20px;

    }


    .edit-form-group label {

        font-size: 12px;

    }


    .edit-input-wrapper input,
    .edit-input-wrapper select {

        min-height: 52px;

        font-size: 13px;

        border-radius: 13px;

    }


    .textarea-wrapper textarea {

        min-height: 165px;

        font-size: 13px;

    }


    .profile-save-section {

        padding: 22px 24px;

        display: flex;

        align-items: center;

        justify-content: space-between;

        gap: 30px;

    }


    .save-info {

        margin-bottom: 0;

    }


    .form-actions {

        min-width: 320px;

    }


    .cancel-button,
    .save-button {

        min-height: 50px;

    }

}


/* =========================================================
   22. LARGE DESKTOP
========================================================= */

@media (min-width: 1200px) {

    .edit-profile-header {

        padding-left: 55px;

        padding-right: 55px;

    }


    .edit-profile-intro,
    .edit-profile-form {

        max-width: 1150px;

    }

}