/* ==========================================================================
   Account Settings Modal
   ========================================================================== */

.wt-as-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 450;
    background: rgba(10, 5, 8, .65);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    align-items: flex-start;
    justify-content: center;
    padding: 24px;
    overflow-y: auto;
}
.wt-as-backdrop--open { display: flex; }

.wt-as-modal {
    position: relative;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    width: 580px;
    max-width: calc(100vw - 32px);
    margin: auto;
    padding: 36px 40px 32px;
    animation: modalIn .25s cubic-bezier(.4, 0, .2, 1);
}

/* ── Paleta gris (sin fucsia) ── */
.wt-as-modal .efm-modal__icon {
    background: var(--gray-400);
    box-shadow: none;
}

.wt-as-modal .efm-section__title svg {
    color: var(--gray-400);
}

.wt-as-modal .efm-btn-primary {
    background: var(--gray-600);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .12);
}
.wt-as-modal .efm-btn-primary:hover {
    background: var(--gray-500);
    box-shadow: 0 6px 20px rgba(0, 0, 0, .16);
}

/* Perfil visual: editar avatar y portada desde la misma vista */
.wt-as-profile-media {
    overflow: hidden;
    margin-bottom: 22px;
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    background: var(--white);
}

.wt-as-profile-media__cover {
    position: relative;
    display: grid;
    place-items: center;
    height: 118px;
    overflow: hidden;
    background:
        linear-gradient(rgba(113, 113, 122, .08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(113, 113, 122, .08) 1px, transparent 1px),
        linear-gradient(135deg, #f4f4f5, #fafafa);
    background-size: 28px 28px, 28px 28px, auto;
}

.wt-as-profile-media__cover.has-image {
    background-image:
        linear-gradient(180deg, rgba(24, 24, 27, .02), rgba(24, 24, 27, .24)),
        var(--wt-as-cover);
    background-position: center;
    background-size: cover;
}

.wt-as-profile-media__cover-placeholder {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--gray-200);
    border-radius: 11px;
    background: rgba(255, 255, 255, .8);
    color: var(--gray-400);
}

.wt-as-profile-media__cover.has-image .wt-as-profile-media__cover-placeholder {
    display: none;
}

.wt-as-profile-media__cover-placeholder svg {
    width: 21px;
    height: 21px;
}

.wt-as-profile-media__cover-action {
    position: absolute;
    right: 10px;
    bottom: 10px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 9px;
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 3px 12px rgba(24, 24, 27, .12);
    color: var(--gray-700);
    font: 650 .76rem/1 'DM Sans', sans-serif;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: background-color .16s ease, transform .16s ease;
}

.wt-as-profile-media__cover-action:hover {
    background: var(--white);
    transform: translateY(-1px);
}

.wt-as-profile-media__cover-action svg {
    width: 15px;
    height: 15px;
}

.wt-as-profile-media__footer {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) auto;
    align-items: center;
    gap: 13px;
    min-height: 78px;
    padding: 11px 14px 12px;
}

.wt-as-profile-media__avatar {
    position: relative;
    align-self: start;
    width: 64px;
    height: 64px;
    margin-top: -34px;
    padding: 3px;
    border: 0;
    border-radius: 50%;
    background: var(--white);
    box-shadow: 0 5px 16px rgba(24, 24, 27, .18);
    cursor: pointer;
}

.wt-as-profile-media__avatar > img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
}

.wt-as-profile-media__avatar > span {
    position: absolute;
    right: -1px;
    bottom: 1px;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border: 2px solid var(--white);
    border-radius: 50%;
    background: var(--gray-700);
    color: var(--white);
}

.wt-as-profile-media__avatar svg {
    width: 11px;
    height: 11px;
}

.wt-as-profile-media__copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.wt-as-profile-media__copy strong {
    color: var(--gray-800);
    font-size: .84rem;
}

.wt-as-profile-media__copy span {
    color: var(--gray-400);
    font-size: .72rem;
    line-height: 1.35;
}

/* ── Footer save ── */
.wt-as-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 24px;
}

.wt-as-footer__btn {
    min-width: 160px;
    justify-content: center;
}

/* ── Inline feedback ── */
.wt-as-feedback {
    font-size: .8rem;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    margin-top: 8px;
    display: none;
    line-height: 1.4;
}
.wt-as-feedback--success {
    display: block;
    background: var(--green-50);
    border: 1px solid #bbf7d0;
    color: #15803d;
}
.wt-as-feedback--error {
    display: block;
    background: var(--red-50);
    border: 1px solid #fecaca;
    color: var(--red-500);
}

/* ── Danger zone ── */
.wt-as-danger-section {
    border-color: #fecaca !important;
    background: #fff5f5;
}
.wt-as-danger-section .efm-section__title { color: #b91c1c; }
.wt-as-danger-section .efm-section__title svg { color: #ef4444; }

.wt-as-danger-desc {
    font-size: .85rem;
    color: var(--gray-500);
    line-height: 1.6;
    margin-bottom: 16px;
}
.wt-as-btn-danger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1.5px solid #fca5a5;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: .875rem;
    font-weight: 600;
    cursor: pointer;
    background: var(--white);
    color: #dc2626;
    transition: background .2s, border-color .2s;
}
.wt-as-btn-danger:hover { background: #fef2f2; border-color: #ef4444; }
.wt-as-btn-danger svg   { width: 15px; height: 15px; }

/* ── Contact section ── */
.wt-as-contact {
    margin-top: 28px;
    padding: 20px 24px;
    background: var(--gray-50);
    border: 1.5px solid var(--gray-100);
    border-radius: var(--radius-md);
    text-align: center;
}

.wt-as-contact__title {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 4px;
}

.wt-as-contact__sub {
    font-size: .82rem;
    color: var(--gray-400);
    line-height: 1.5;
    margin-bottom: 16px;
}

.wt-as-contact__links {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.wt-as-contact__btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: var(--radius-full);
    font-family: inherit;
    font-size: .84rem;
    font-weight: 600;
    text-decoration: none;
    border: 1.5px solid transparent;
    transition: transform .15s, box-shadow .15s, opacity .15s;
}

.wt-as-contact__btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    opacity: .9;
}

.wt-as-contact__btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.wt-as-contact__btn--wa {
    background: #25d366;
    color: #fff;
    border-color: #25d366;
}

.wt-as-contact__btn--tg {
    background: var(--telegram-blue);
    color: #fff;
    border-color: var(--telegram-blue);
}

.wt-as-contact__btn--email {
    background: var(--white);
    color: var(--gray-700);
    border-color: var(--gray-200);
}

/* ── Delete confirm modal ── */
.wt-as-del-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 500;
    background: rgba(10, 5, 8, .75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.wt-as-del-backdrop--open { display: flex; }

.wt-as-del-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    width: 420px;
    max-width: calc(100vw - 32px);
    padding: 32px;
    animation: modalIn .2s cubic-bezier(.4, 0, .2, 1);
    text-align: center;
}
.wt-as-del-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #fef2f2;
    border: 1.5px solid #fecaca;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}
.wt-as-del-icon svg { width: 22px; height: 22px; color: #dc2626; }
.wt-as-del-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
}
.wt-as-del-msg {
    font-size: .875rem;
    color: var(--gray-500);
    line-height: 1.6;
    margin-bottom: 24px;
}
.wt-as-del-actions { display: flex; gap: 10px; }
.wt-as-del-cancel {
    flex: 1;
    padding: 11px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--gray-200);
    background: var(--white);
    color: var(--gray-700);
    font-family: inherit;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .2s, color .2s;
}
.wt-as-del-cancel:hover { border-color: var(--gray-300); color: var(--gray-900); }
.wt-as-del-confirm {
    flex: 1;
    padding: 11px;
    border-radius: var(--radius-sm);
    border: none;
    background: #dc2626;
    color: var(--white);
    font-family: inherit;
    font-size: .9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s;
}
.wt-as-del-confirm:hover    { background: #b91c1c; }
.wt-as-del-confirm:disabled { opacity: .6; cursor: not-allowed; }

/* ── Responsive ── */
@media (max-width: 620px) {
    .wt-as-backdrop {
        padding: 0;
        overflow: hidden;
    }

    .wt-as-modal {
        position: fixed;
        inset: 0;
        border-radius: 0;
        padding: 28px 18px 24px;
        margin: 0;
        width: 100%;
        max-width: 100%;
        max-height: none;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .wt-as-modal .efm-modal__close {
        position: fixed;
        top: 12px;
        right: 12px;
        z-index: 451;
    }

    .wt-as-footer {
        position: sticky;
        bottom: 0;
        margin: 16px -18px -24px;
        padding: 14px 18px;
        background: var(--white);
        border-top: 1px solid var(--gray-100);
        box-shadow: 0 -4px 12px rgba(0,0,0,.06);
    }

    .wt-as-footer__btn {
        width: 100%;
    }

    .wt-as-profile-media__cover {
        height: 104px;
    }

    .wt-as-profile-media__footer {
        grid-template-columns: 58px minmax(0, 1fr);
        gap: 11px;
    }

    .wt-as-profile-media__avatar {
        width: 58px;
        height: 58px;
        margin-top: -29px;
    }

    .wt-as-del-actions { flex-direction: column-reverse; }
    .wt-as-contact__links { gap: 8px; }
}
