/*
 * profile.css — Profile edit page (v3.0)
 *
 * @author  Mr.Server hossam.net HOSSAM ALZYOD
 * @version 3.0
 */

/* ================================================================
   PAGE WRAPPER
   ================================================================ */
.profile-edit-page {
    max-width: 600px;
    margin: 0 auto;
    padding: 80px 16px 40px;
    min-height: 100vh;
    background: #0f1923;
}

/* ================================================================
   HEADER
   ================================================================ */
.profile-edit-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
    text-align: center;
}

.profile-edit-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00c9a7 0%, #0097a7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0,201,167,.35);
}

.profile-edit-icon i {
    font-size: 34px;
    color: #fff;
}

.profile-edit-title {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

/* ================================================================
   ALERTS
   ================================================================ */
.profile-alert {
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 18px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-alert-error {
    background: rgba(229,57,53,.15);
    border: 1px solid rgba(229,57,53,.35);
    color: #ef9a9a;
}

.profile-alert-success {
    background: rgba(0,201,167,.12);
    border: 1px solid rgba(0,201,167,.35);
    color: #80cbc4;
}

/* ================================================================
   FORM
   ================================================================ */
.profile-edit-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ================================================================
   SECTIONS
   ================================================================ */
.profile-section {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 14px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.profile-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #00c9a7;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,.07);
}

.profile-section-header i {
    font-size: 16px;
}

/* ================================================================
   FIELDS
   ================================================================ */
.profile-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.profile-label {
    font-size: 13px;
    font-weight: 600;
    color: #8faab8;
    letter-spacing: .02em;
}

/* ================================================================
   INPUTS
   ================================================================ */
.profile-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.profile-input-icon {
    position: absolute;
    left: 14px;
    color: #8faab8;
    font-size: 15px;
    pointer-events: none;
}

[dir="rtl"] .profile-input-icon {
    left: auto;
    right: 14px;
}

.profile-input {
    width: 100%;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 10px;
    color: #fff;
    font-size: 15px;
    padding: 12px 14px 12px 42px;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

[dir="rtl"] .profile-input {
    padding: 12px 42px 12px 14px;
}

.profile-input:focus {
    border-color: #00c9a7;
    box-shadow: 0 0 0 3px rgba(0,201,167,.15);
}

.profile-input::placeholder { color: #4a6070; }

input[type="date"].profile-input::-webkit-calendar-picker-indicator {
    filter: invert(.6);
}

.profile-field-hint {
    font-size: 12px;
    color: #4a6070;
    margin: 0;
}

.profile-field-hint.dob-locked {
    color: #8faab8;
    font-style: italic;
}

/* ================================================================
   GENDER PILLS
   ================================================================ */
.profile-gender-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.gender-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.04);
    color: #8faab8;
    font-size: 13px;
    cursor: pointer;
    transition: border-color .2s, background .2s, color .2s;
    user-select: none;
}

.gender-pill input[type="radio"] {
    display: none;
}

.gender-pill:hover {
    border-color: rgba(0,201,167,.4);
    color: #cce8e2;
}

.gender-pill.active {
    border-color: #00c9a7;
    background: rgba(0,201,167,.15);
    color: #00c9a7;
    font-weight: 600;
}

/* ================================================================
   LOCATION TOGGLE
   ================================================================ */
.profile-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.profile-toggle-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.profile-toggle-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(0,201,167,.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00c9a7;
    font-size: 16px;
    flex-shrink: 0;
}

.profile-toggle-switch {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
    flex-shrink: 0;
}

.profile-toggle-switch input { display: none; }

.profile-toggle-track {
    display: block;
    width: 46px;
    height: 26px;
    border-radius: 999px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.10);
    position: relative;
    transition: background .25s, border-color .25s;
}

.profile-toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #8faab8;
    transition: transform .25s, background .25s;
}

.profile-toggle-switch input:checked + .profile-toggle-track {
    background: rgba(0,201,167,.35);
    border-color: #00c9a7;
}

.profile-toggle-switch input:checked + .profile-toggle-track .profile-toggle-thumb {
    transform: translateX(20px);
    background: #00c9a7;
}

/* ================================================================
   SOCIAL INPUTS
   ================================================================ */
.profile-social-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.profile-social-icon {
    position: absolute;
    left: 14px;
    font-size: 18px;
    pointer-events: none;
    line-height: 1;
}

[dir="rtl"] .profile-social-icon {
    left: auto;
    right: 14px;
}

.profile-social-input {
    padding-left: 44px !important;
}

[dir="rtl"] .profile-social-input {
    padding-left: 14px !important;
    padding-right: 44px !important;
}

/* ================================================================
   ACTIONS & BACK
   ================================================================ */
.profile-actions {
    margin-top: 4px;
}

.profile-save-btn {
    width: 100%;
    justify-content: center;
    font-size: 16px;
    padding: 14px 24px;
}

.profile-back-link {
    display: flex;
    justify-content: center;
    margin-top: 16px;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 480px) {
    .profile-edit-page { padding-top: 70px; }
    .profile-gender-pills { gap: 6px; }
    .gender-pill { padding: 7px 12px; font-size: 12px; }
}

/* ================================================================
   PUBLIC PROFILE PAGE  (pub-*)
   ================================================================ */

/* --- Send Button override --- */
.pub-send-wrap {
    box-shadow: 0 6px 24px rgba(0, 201, 167, 0.3);
    border-radius: 14px;
}
.pub-send-bgbtn {
    background: linear-gradient(135deg, #00c9a7, #00b496);
    border-radius: 14px;
    transition: opacity .25s;
}
.pub-send-wrap:hover .pub-send-bgbtn { opacity: .88; }
.pub-send-btn {
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .04em;
    height: 54px;
    text-transform: none;
}

/* --- Report Button --- */
.pub-report-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 100;
    background: transparent;
    border: 2px solid rgba(255,255,255,.15);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color .2s, color .2s;
    color: rgba(255,255,255,.3);
    font-size: .85rem;
}
.pub-report-btn:hover {
    border-color: rgba(255,80,80,.5);
    color: rgba(255,80,80,.8);
}

/* --- Profile Header --- */
.pub-profile-header {
    text-align: center;
    margin-bottom: 24px;
}
.pub-profile-avatar-wrap {
    position: relative;
    width: 100px;
    height: 100px;
    overflow: hidden;
    border-radius: 50%;
    margin: 0 auto 15px;
    border: 1px solid var(--gender-color, gray);
    box-shadow:
        0 0 10px var(--gender-color, gray),
        0 0 20px var(--gender-color, gray),
        0 0 30px var(--gender-color, gray);
}
.pub-profile-avatar-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.pub-profile-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.pub-profile-name-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.pub-profile-name  { color: #fff; }
.pub-verified-badge { width: 18px; height: 18px; }

/* Badge stays visually to the right of the name in RTL */
html[dir="rtl"] .pub-profile-name-row { flex-direction: row-reverse; }

/* --- Stats --- */
.pub-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}
.pub-stat {
    display: flex;
    align-items: center;
    gap: 5px;
}
html[dir="rtl"] .pub-stats { flex-direction: row-reverse; }
html[dir="rtl"] .pub-stat  { flex-direction: row-reverse; }
.pub-stat-icon         { font-size: 18px; }
.pub-stat-icon--msg    { color: rgb(46,126,1); }
.pub-stat-icon--del    { color: rgb(206,0,0); }
.pub-stat-icon--visit  { color: rgb(50,120,177); }
.pub-stat-count        { font-size: 14px; color: #fff; }

/* --- Social Links --- */
.pub-social-links { text-align: center; margin-top: 24px; }
.pub-social-icons {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

/* Base icon button — circle with brand-tinted glass */
.pub-social-icon-btn {
    --brand: rgba(255,255,255,.15);
    --brand-border: rgba(255,255,255,.18);
    --brand-glow: rgba(255,255,255,.12);
    --icon-color: rgba(255,255,255,.9);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--brand);
    border: 1px solid var(--brand-border);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform .25s cubic-bezier(.34,1.56,.64,1),
                background .22s, border-color .22s,
                box-shadow .22s;
    position: relative;
    overflow: hidden;
}
.pub-social-icon-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.18), transparent 70%);
    pointer-events: none;
}
.pub-social-icon-btn:hover {
    transform: translateY(-4px) scale(1.08);
    background: var(--brand);
    box-shadow: 0 8px 20px var(--brand-glow);
    border-color: var(--brand-border);
}
.pub-social-icon-btn i   { font-size: 17px; color: var(--icon-color); position: relative; z-index: 1; }
.pub-social-icon-btn svg { position: relative; z-index: 1; color: var(--icon-color); fill: var(--icon-color); opacity: .85; }
.pub-social-icon-btn:hover svg { opacity: 1; }
.pub-social-icon-btn img { width: 17px; height: 17px; position: relative; z-index: 1; filter: brightness(0) invert(1); opacity: .9; }
.pub-social-icon-btn:hover img { opacity: 1; }

/* Per-platform brand colours */
.pub-social-icon-btn--facebook  { --brand: rgba(24,119,242,.2);  --brand-border: rgba(24,119,242,.4);  --brand-glow: rgba(24,119,242,.3);  --icon-color: #4f9ef8; }
.pub-social-icon-btn--instagram { --brand: rgba(228,64,95,.2);   --brand-border: rgba(228,64,95,.4);   --brand-glow: rgba(228,64,95,.3);   --icon-color: #f26b8a; }
.pub-social-icon-btn--whatsapp  { --brand: rgba(37,211,102,.15); --brand-border: rgba(37,211,102,.35); --brand-glow: rgba(37,211,102,.25); --icon-color: #4ce882; }
.pub-social-icon-btn--telegram  { --brand: rgba(0,136,204,.2);   --brand-border: rgba(0,136,204,.4);   --brand-glow: rgba(0,136,204,.3);   --icon-color: #4db8e8; }
.pub-social-icon-btn--snapchat  { --brand: rgba(255,252,0,.12);  --brand-border: rgba(255,252,0,.3);   --brand-glow: rgba(255,252,0,.2);   --icon-color: #FFFC00; }
.pub-social-icon-btn--x         { --brand: rgba(255,255,255,.1); --brand-border: rgba(255,255,255,.2); --brand-glow: rgba(255,255,255,.15); }
.pub-social-icon-btn--signal    { --brand: rgba(58,118,240,.2);  --brand-border: rgba(58,118,240,.4);  --brand-glow: rgba(58,118,240,.3);  }

/* --- Feedback Box --- */
.pub-feedback-box  { margin: 1.25rem 0; text-align: center; }
.pub-feedback-hint {
    display: block;
    font-size: .85rem;
    color: rgba(255,255,255,.6);
    margin-bottom: .75rem;
    transition: opacity .45s ease;
}
.pub-message-textarea {
    resize: none;
    padding: 15px;
    font-size: .95rem;
    border: none;
    outline: none;
    background: linear-gradient(135deg, #f9f9f9, #ffffff);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 0 10px rgba(0,0,0,.05);
    width: 100%;
}

/* --- Privacy / Status --- */
.pub-privacy-note {
    font-size: 10px;
    margin-top: 10px;
    line-height: 1.4;
    text-align: center;
    color: rgba(255,255,255,.5);
}
.pub-feedback-status { font-size: .95rem; }

/* --- Section Divider --- */
.pub-section-divider {
    border: none;
    border-top: 1px solid rgba(255,255,255,.15);
    margin: 20px 0;
    width: 100%;
}

/* --- Public Globe Icon colour --- */
.pub-icon--green { color: #28a745; }

/* --- No Messages --- */
.pub-no-messages {
    color: #ffcdd2;
    font-weight: 600;
    font-size: 1rem;
}

/* --- Message header helpers --- */
.pub-msg-from    { display: flex; align-items: center; gap: 8px; font-weight: bold; }
.pub-msg-date    { display: flex; align-items: center; gap: 5px; }
.pub-reply-inner { display: flex; align-items: flex-start; gap: 10px; }

/* --- Signup CTA --- */
.pub-signup-cta      { margin-top: 1.5rem; text-align: center; }
.pub-signup-cta h3   { color: #fff; margin-bottom: .4rem; }
.pub-signup-cta p    { color: rgba(255,255,255,.8); margin-bottom: 1rem; }
.pub-register-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 8px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: background .2s, border-color .2s;
}
.pub-register-btn:hover {
    background: rgba(255,255,255,.22);
    border-color: rgba(255,255,255,.35);
    color: #fff;
}

/* --- Copyright --- */
.pub-copyright {
    text-align: center;
    color: rgba(255,255,255,.4);
    font-size: .8rem;
    margin-top: 1.5rem;
}

/* ── Promo Register Modal ─────────────────────────────────────────── */
.promo-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 1060;
    backdrop-filter: blur(4px);
}
.promo-overlay.show { display: block; }

.promo-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -56%);
    z-index: 1070;
    background: rgba(15,25,35,.97);
    border: 1px solid rgba(0,201,167,.3);
    border-radius: 20px;
    padding: 36px 32px;
    max-width: 380px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,.7);
    animation: promoIn .35s cubic-bezier(.34,1.56,.64,1) both;
}
.promo-modal.show { display: block; }

@keyframes promoIn {
    from { opacity: 0; transform: translate(-50%, -44%); }
    to   { opacity: 1; transform: translate(-50%, -56%); }
}

.promo-icon {
    font-size: 3rem;
    margin-bottom: 8px;
    animation: promoIconBounce 1s .3s ease both;
}
@keyframes promoIconBounce {
    0%   { transform: scale(0); }
    70%  { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.promo-title { color: #fff; font-size: 1.15rem; font-weight: 800; margin: 0 0 10px; }
.promo-body  { color: #8faab8; font-size: .9rem; line-height: 1.6; margin: 0 0 22px; }

.promo-btn-yes {
    display: block;
    background: linear-gradient(135deg, #00c9a7, #0099a7);
    color: #fff;
    font-weight: 700;
    font-size: .95rem;
    padding: 13px 24px;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 6px 24px rgba(0,201,167,.4);
    transition: transform .15s, box-shadow .15s;
    margin-bottom: 10px;
}
.promo-btn-yes:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 32px rgba(0,201,167,.6);
    color: #fff;
}

.promo-btn-no {
    background: none;
    border: 1px solid rgba(255,255,255,.15);
    color: #8faab8;
    font-size: .85rem;
    padding: 9px 20px;
    border-radius: 50px;
    cursor: pointer;
    width: 100%;
    transition: background .15s;
}
.promo-btn-no:hover {
    background: rgba(255,255,255,.06);
    color: #c9d1d9;
}

/* ── Toast notification ───────────────────────────────────────────── */
.msg-toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    opacity: 0;
    background: rgba(12,30,20,.96);
    border: 1px solid rgba(0,201,167,.35);
    border-left: 3px solid #00c9a7;
    border-radius: 12px;
    padding: 13px 22px;
    color: #d0e8f0;
    font-size: .92rem;
    font-weight: 500;
    box-shadow: 0 8px 30px rgba(0,0,0,.5);
    z-index: 1080;
    transition: opacity .3s, transform .3s;
    white-space: nowrap;
}
.msg-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
