/* ---------- Edit Profile ---------- */

/* ============================================================
   Edit Profile — STYLES
   Keep page/component styles in logical sections below.
   ============================================================ */

/* =========================================================
   APEMART.LK — EDIT PROFILE PAGE POLISH
   Consistent with the rounded account-page system used by
   Profile, My Ads, Messages, Notifications and Settings.
   Existing JS IDs are intentionally preserved.
========================================================= */

.edit-profile-page{width:100%;min-height:calc(100vh - 150px);box-sizing:border-box}

.edit-profile-shell{width:100%;max-width:1280px;margin:0 auto;padding:18px 24px 58px;box-sizing:border-box}

.edit-profile-breadcrumb{display:flex;align-items:center;gap:9px;min-height:28px;margin:0 4px 14px;color:#7a818b;font-size:13px;font-weight:600}
.edit-profile-breadcrumb a{color:#6f7782;text-decoration:none;transition:color .2s ease}
.edit-profile-breadcrumb a:hover{color:#ff6b00}
.edit-profile-breadcrumb .current{color:#ff6b00}

.edit-profile-hero{background:rgba(255,255,255,.94);border:1px solid rgba(15,23,42,.06);border-radius:22px;box-shadow:0 10px 30px rgba(15,23,42,.07);padding:30px 34px;margin-bottom:20px}
.edit-profile-heading{display:flex;align-items:center;gap:18px}
.edit-profile-icon{width:58px;height:58px;flex:0 0 58px;display:flex;align-items:center;justify-content:center;border-radius:17px;background:#fff4e9;border:1px solid #ffe0c7;color:#ff6b00;font-size:25px}
.edit-profile-eyebrow{margin-bottom:5px;color:#ef6c22;font-size:11px;font-weight:800;letter-spacing:.16em}
.edit-profile-hero h1{margin:0;color:#171a1f;font-size:32px;line-height:1.2;font-weight:800}
.edit-profile-hero p{margin:7px 0 0;color:#68717d;font-size:14px;line-height:1.5}

.edit-profile-layout{display:grid;grid-template-columns:minmax(270px,.72fr) minmax(0,1.7fr);gap:16px;align-items:start}
.edit-profile-card{width:100%;min-width:0;box-sizing:border-box;background:rgba(255,255,255,.96);border:1px solid rgba(15,23,42,.06);border-radius:18px;box-shadow:0 7px 22px rgba(15,23,42,.055);padding:23px 24px}
.profile-photo-card{min-height:100%}
.cover-card{grid-column:1/-1}

.card-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:15px;margin-bottom:20px}
.card-heading h2{margin:0 0 7px;color:#20242a;font-size:18px;line-height:1.35;font-weight:800}
.card-heading h2 i{margin-right:7px;color:#ff6b00;font-size:15px}
.card-heading p{margin:0;color:#707782;font-size:13px;line-height:1.6}

.profile-photo-upload{position:relative;width:154px;height:154px;margin:26px auto 20px}
.profile-photo-label{position:relative;display:block;width:154px;height:154px;cursor:pointer}
.profile-photo-upload img{display:block;width:154px;height:154px;border-radius:50%;object-fit:cover;border:5px solid #fff;box-shadow:0 10px 26px rgba(15,23,42,.16);transition:transform .2s ease,box-shadow .2s ease}
.profile-photo-label:hover img{transform:scale(1.025);box-shadow:0 13px 30px rgba(15,23,42,.2)}
.photo-hover{position:absolute;inset:5px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:rgba(15,23,42,.45);color:#fff;font-size:22px;opacity:0;transition:opacity .2s ease}
.profile-photo-label:hover .photo-hover{opacity:1}
.camera-btn{position:absolute;right:0;bottom:2px;width:42px;height:42px;background:#ff6b00;border:3px solid #fff;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;cursor:pointer;box-shadow:0 5px 14px rgba(15,23,42,.2);margin:0!important;padding:0}
.camera-btn i{font-size:15px;line-height:1}
.photo-tip{display:flex;align-items:flex-start;justify-content:center;gap:8px;padding:11px 12px;border:1px solid #edf0f3;border-radius:12px;background:#fafbfc;color:#7b838e;font-size:11px;line-height:1.5;text-align:left}
.photo-tip i{color:#ff6b00;margin-top:2px}

.profile-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:17px 15px}
.form-field{min-width:0}
.form-field.full-width{grid-column:1/-1}
.form-field label{display:block;margin:0 0 8px;color:#3e4650;font-size:13px;font-weight:800}
.input-wrap{position:relative;display:flex;align-items:center}
.input-wrap>i{position:absolute;left:13px;z-index:1;color:#9aa2ad;font-size:13px;pointer-events:none}
.input-wrap input{width:100%;min-height:46px;padding:11px 13px 11px 37px;border:1px solid #e2e6eb;border-radius:11px;outline:none;background:#fbfcfd;color:#252a31;font-size:13px;box-sizing:border-box;transition:border-color .2s ease,box-shadow .2s ease,background .2s ease}
.input-wrap input::placeholder{color:#a4abb4}
.input-wrap input:focus{border-color:#ffb27c;background:#fff;box-shadow:0 0 0 3px rgba(255,107,0,.08)}
.disabled-input input{background:#f4f6f8;color:#7c8490;cursor:not-allowed}
.form-field small{display:block;margin-top:6px;color:#929aa5;font-size:10px;line-height:1.4}
.form-field small i{margin-right:4px}

.cover-heading{align-items:center}
.cover-selected-label{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:7px 12px;border-radius:999px;background:#fff4e9;border:1px solid #ffd9bd;color:#ef6c22;font-size:11px;font-weight:800;white-space:nowrap}
.cover-design{position:relative;display:block;width:100%;padding:0 0 9px;border:1px solid #e4e8ed;border-radius:13px;background:#fff;overflow:hidden;color:#525a65;cursor:pointer;text-align:left;transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}
.cover-design:hover{transform:translateY(-2px);border-color:#ffc59f;box-shadow:0 8px 18px rgba(15,23,42,.08)}
.cover-design img{display:block;width:100%;height:82px;object-fit:cover}
.cover-design span{display:block;padding:8px 10px 0;font-size:11px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cover-design.active{border:2px solid #ff6b00;box-shadow:0 7px 18px rgba(255,107,0,.13);padding-bottom:8px}
.cover-design.active:after{content:'✓';position:absolute;top:8px;right:8px;width:23px;height:23px;border-radius:50%;display:grid;place-items:center;background:#ff6b00;color:#fff;font-size:12px;font-weight:900;box-shadow:0 3px 8px rgba(0,0,0,.18)}
.cover-design.active span{color:#ef6c22}

.edit-profile-actions{grid-column:1/-1;display:flex;justify-content:flex-end;align-items:center;gap:10px;padding-top:2px}
.cancel-profile-btn,#saveProfileBtn{min-height:44px;padding:10px 20px;border-radius:11px;font-size:13px;font-weight:800;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:8px;box-sizing:border-box;cursor:pointer;transition:transform .2s ease,box-shadow .2s ease,background .2s ease,border-color .2s ease}
.cancel-profile-btn{background:#fff;color:#5e6671;border:1px solid #dfe4e9}
.cancel-profile-btn:hover{background:#f7f8fa;border-color:#cfd5dc;transform:translateY(-1px)}
#saveProfileBtn{border:0;background:#ff6b00;color:#fff;box-shadow:0 6px 15px rgba(255,107,0,.2)}
#saveProfileBtn:hover{background:#e85d00;transform:translateY(-1px);box-shadow:0 8px 18px rgba(255,107,0,.25)}

/* Dark mode */
body.dark-mode .edit-profile-hero,html[data-theme="dark"] .edit-profile-hero,
body.dark-mode .edit-profile-card,html[data-theme="dark"] .edit-profile-card{background:#18202d;border-color:#2d3748;color:#f3f4f6}
body.dark-mode .edit-profile-hero h1,html[data-theme="dark"] .edit-profile-hero h1,
body.dark-mode .card-heading h2,html[data-theme="dark"] .card-heading h2{color:#f3f4f6}
body.dark-mode .edit-profile-hero p,html[data-theme="dark"] .edit-profile-hero p,
body.dark-mode .card-heading p,html[data-theme="dark"] .card-heading p{color:#aeb6c2}
body.dark-mode .edit-profile-breadcrumb a,html[data-theme="dark"] .edit-profile-breadcrumb a{color:#aeb6c2}
body.dark-mode .edit-profile-breadcrumb .current,html[data-theme="dark"] .edit-profile-breadcrumb .current{color:#ff8a3d}
body.dark-mode .edit-profile-icon,html[data-theme="dark"] .edit-profile-icon{background:#2b211a;border-color:#5a3824}
body.dark-mode .form-field label,html[data-theme="dark"] .form-field label{color:#cbd1d9}
body.dark-mode .input-wrap input,html[data-theme="dark"] .input-wrap input{background:#141b26;border-color:#354052;color:#f3f4f6}
body.dark-mode .disabled-input input,html[data-theme="dark"] .disabled-input input{background:#111720;color:#9ca5b1}
body.dark-mode .photo-tip,html[data-theme="dark"] .photo-tip{background:#141b26;border-color:#354052;color:#aeb6c2}
body.dark-mode .cover-design,html[data-theme="dark"] .cover-design{background:#141b26;border-color:#354052;color:#cbd1d9}
body.dark-mode .cover-design:hover,html[data-theme="dark"] .cover-design:hover{border-color:#8a5737}
body.dark-mode .cover-design.active,html[data-theme="dark"] .cover-design.active{border-color:#ff8a3d}
body.dark-mode .cover-selected-label,html[data-theme="dark"] .cover-selected-label{background:#2b211a;border-color:#5a3824;color:#ff9b5e}
body.dark-mode .cancel-profile-btn,html[data-theme="dark"] .cancel-profile-btn{background:#141b26;border-color:#354052;color:#cbd1d9}

@media(max-width:900px){
    .edit-profile-layout{grid-template-columns:1fr}
    .profile-photo-card{min-height:0}
    .cover-card{grid-column:auto}
    .edit-profile-actions{grid-column:auto}
    .cover-design-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}

@media(max-width:768px){
    .edit-profile-shell{padding:14px 14px 38px}
    .edit-profile-breadcrumb{margin:0 2px 12px;font-size:12px}
    .edit-profile-hero{padding:22px 18px;border-radius:18px;margin-bottom:14px}
    .edit-profile-heading{align-items:flex-start;gap:13px}
    .edit-profile-icon{width:48px;height:48px;flex-basis:48px;border-radius:14px;font-size:21px}
    .edit-profile-eyebrow{font-size:10px}
    .edit-profile-hero h1{font-size:25px}
    .edit-profile-hero p{font-size:13px}
    .edit-profile-layout{gap:13px}
    .edit-profile-card{padding:18px 16px;border-radius:15px}
    .card-heading h2{font-size:17px}
    .card-heading p{font-size:12px}
    .profile-form-grid{grid-template-columns:1fr;gap:14px}
    .form-field.full-width{grid-column:auto}
    .cover-heading{align-items:flex-start;flex-direction:column}
    .cover-selected-label{align-self:flex-start}
    .cover-design-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
    .cover-design img{height:76px}
    .edit-profile-actions{flex-direction:column-reverse;align-items:stretch}
    .cancel-profile-btn,#saveProfileBtn{width:100%}
}

@media(max-width:420px){
    .edit-profile-hero h1{font-size:23px}
    .profile-photo-upload,.profile-photo-label,.profile-photo-upload img{width:138px;height:138px}
    .camera-btn{width:39px;height:39px}
}


/* Account feature controls: keep disabled profile fields visually consistent with the locked email/phone fields. */
.form-field.feature-disabled .input-wrap { opacity:.68; background:#f7f8fa; }
.form-field.feature-disabled input:disabled { cursor:not-allowed; }
.feature-lock-note { color:#8a93a1; font-size:11px; margin-top:6px; display:block; }
.feature-lock-note i { margin-right:4px; }

/* Phone verification in Edit Profile */
.phone-profile-field{min-width:0}.phone-profile-row{display:flex;align-items:stretch;gap:9px}.phone-profile-row .input-wrap{flex:1;min-width:0}.phone-profile-row .input-wrap input{min-height:46px}.phone-profile-verify-btn{flex:0 0 auto;min-width:108px;border:0;border-radius:11px;background:#ff6b00;color:#fff;font-size:12px;font-weight:800;padding:0 15px;cursor:pointer;transition:.2s ease}.phone-profile-verify-btn:hover{background:#e85f00;transform:translateY(-1px)}.phone-profile-verify-btn:disabled{opacity:.65;cursor:wait;transform:none}.phone-profile-otp{margin-top:10px}.phone-profile-otp label{display:block;margin:0 0 7px;font-size:12px;font-weight:700;color:#5f6873}.phone-verified-badge{display:inline-flex;align-items:center;gap:7px;margin-top:9px;padding:7px 10px;border-radius:999px;background:#ecfdf3;color:#16834a;font-size:11px;font-weight:800}.phone-verified-badge i{font-size:12px}@media(max-width:600px){
    .phone-profile-row{
        display:grid;
        grid-template-columns:minmax(0,1fr);
        gap:9px;
        width:100%;
    }
    .phone-profile-row .input-wrap{
        width:100%;
        min-width:0;
    }
    .phone-profile-row .input-wrap input{
        width:100%;
        min-height:48px;
        padding-right:14px;
    }
    .phone-profile-verify-btn{
        width:100%;
        min-width:0;
        min-height:48px;
        padding:0 14px;
        border-radius:11px;
        font-size:13px;
    }
}
