/* =========================================================
   We Love Medellín - User Account / Profile Panel
   public/css/profile.css
   ========================================================= */

.wlm-account-page {
    padding: 34px 0 0;
}

.wlm-account-hero {
    position: relative;
    overflow: hidden;
    min-height: 460px;
    border: 1px solid var(--border);
    border-radius: 46px;
    background: #fff;
    box-shadow: var(--shadow-lg);
    isolation: isolate;
}

.wlm-account-cover {
    position: absolute;
    inset: 0 0 auto;
    z-index: 0;
    height: 255px;
    overflow: hidden;
    background:
        radial-gradient(circle at 18% 25%, rgba(255, 56, 92, 0.24), transparent 26%),
        radial-gradient(circle at 80% 16%, rgba(255, 184, 77, 0.22), transparent 24%),
        linear-gradient(135deg, #fff8f3, #f7f7f7 48%, #ffffff);
}

.wlm-account-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.9)),
        repeating-linear-gradient(90deg, rgba(17,17,17,0.035) 0 1px, transparent 1px 82px);
}

.wlm-account-cover-orb {
    position: absolute;
    border-radius: 999px;
    filter: blur(2px);
    opacity: 0.9;
}

.wlm-account-cover-orb-one {
    left: 9%;
    top: 34px;
    width: 128px;
    height: 128px;
    background: rgba(255, 56, 92, 0.18);
}

.wlm-account-cover-orb-two {
    right: 13%;
    top: 42px;
    width: 170px;
    height: 170px;
    background: rgba(17, 17, 17, 0.07);
}

.wlm-account-cover-grid {
    position: absolute;
    right: 7%;
    top: 46px;
    width: 260px;
    height: 130px;
    border: 1px solid rgba(255,255,255,0.72);
    border-radius: 34px;
    background: rgba(255,255,255,0.36);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow-sm);
}

.wlm-account-identity-card {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 28px;
    align-items: end;
    padding: 148px 36px 26px;
}

.wlm-profile-avatar-xl,
.wlm-profile-avatar-sm {
    display: grid;
    place-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, var(--brand), var(--ink));
    color: #fff;
    font-family: var(--font-display);
    font-weight: 900;
    letter-spacing: -0.06em;
}

.wlm-profile-avatar-xl img,
.wlm-profile-avatar-sm img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wlm-profile-avatar-xl {
    width: 180px;
    height: 180px;
    border: 8px solid #fff;
    border-radius: 44px;
    font-size: 58px;
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.18);
}

.wlm-profile-avatar-sm {
    width: 56px;
    height: 56px;
    flex: 0 0 auto;
    border-radius: 20px;
    font-size: 22px;
}

.wlm-account-identity-main {
    min-width: 0;
    padding-bottom: 8px;
}

.wlm-account-kicker-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.wlm-profile-badge {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.86);
    color: var(--muted);
    font-size: 13px;
    font-weight: 850;
    box-shadow: var(--shadow-xs);
}

.wlm-profile-badge.is-verified {
    border-color: var(--ink);
    background: var(--ink);
    color: #fff;
}

.wlm-profile-badge i {
    font-size: 12px;
}

.wlm-account-identity-main h1 {
    margin: 0;
    max-width: 850px;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: clamp(38px, 5.4vw, 72px);
    line-height: 0.92;
    letter-spacing: -0.065em;
    font-weight: 900;
    text-wrap: balance;
}

.wlm-profile-handle {
    margin: 11px 0 0;
    color: var(--brand);
    font-size: 16px;
    font-weight: 900;
    letter-spacing: -0.015em;
}

.wlm-profile-bio {
    max-width: 760px;
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.62;
    letter-spacing: -0.015em;
    font-weight: 500;
}

.wlm-profile-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 18px;
}

.wlm-profile-meta-row span {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 13px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    box-shadow: var(--shadow-xs);
}

.wlm-profile-meta-row i {
    color: var(--brand);
}

.wlm-profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 22px;
}

.wlm-profile-actions form {
    margin: 0;
}

.wlm-profile-stat-strip {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    margin: 0 26px 26px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 30px;
    background: var(--border);
}

.wlm-profile-stat-strip div {
    min-height: 104px;
    display: grid;
    align-content: center;
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.92);
}

.wlm-profile-stat-strip strong {
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 34px;
    line-height: 1;
    letter-spacing: -0.055em;
    font-weight: 900;
}

.wlm-profile-stat-strip span {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.wlm-profile-message-wrap {
    margin-top: 20px;
}

.wlm-profile-message-wrap .auth-message {
    margin: 0;
}

.wlm-account-layout {
    display: grid;
    /* 2 columnas: contenido principal + panel social. La edición vive en su modal. */
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 22px;
    align-items: start;
    padding-top: 22px;
}

.wlm-account-right {
    position: sticky;
    top: 96px;
    display: grid;
    gap: 16px;
}

.wlm-account-main {
    min-width: 0;
    display: grid;
    gap: 16px;
}

.wlm-account-card {
    min-width: 0;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 32px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.wlm-card-kicker {
    display: inline-flex;
    color: var(--brand);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.wlm-account-card h2 {
    margin: 8px 0 0;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 27px;
    line-height: 1;
    letter-spacing: -0.05em;
    font-weight: 900;
}

.wlm-account-card p {
    margin: 11px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
    font-weight: 600;
}

.wlm-profile-form {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.wlm-profile-field {
    display: grid;
    gap: 8px;
}

.wlm-profile-field > span {
    color: var(--ink);
    font-size: 13px;
    font-weight: 900;
}

.wlm-profile-field input,
.wlm-profile-field textarea {
    width: 100%;
    border: 1px solid var(--border-strong);
    border-radius: 20px;
    outline: 0;
    background: var(--paper-soft);
    color: var(--ink);
    font-size: 15px;
    font-weight: 650;
    transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.wlm-profile-field input {
    min-height: 50px;
    padding: 0 15px;
}

.wlm-profile-field textarea {
    min-height: 126px;
    padding: 15px;
    resize: vertical;
    line-height: 1.5;
}

.wlm-profile-field input:focus,
.wlm-profile-field textarea:focus {
    border-color: var(--brand);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(255, 56, 92, 0.13);
}

.wlm-profile-completion-card {
    background: linear-gradient(180deg, var(--paper-warm), #fff);
}

.wlm-profile-completion-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: start;
}

.wlm-profile-completion-head strong {
    min-width: 54px;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    font-size: 13px;
    font-weight: 900;
    box-shadow: var(--shadow-xs);
}

.wlm-profile-progress {
    height: 10px;
    margin-top: 18px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(17, 17, 17, 0.08);
}

.wlm-profile-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--brand);
}

.wlm-profile-check-list {
    display: grid;
    gap: 9px;
    padding: 0;
    margin: 18px 0 0;
    list-style: none;
}

.wlm-profile-check {
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    color: var(--muted);
    font-size: 13px;
    font-weight: 850;
}

.wlm-profile-check i {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--paper-soft);
    color: var(--soft);
    font-size: 11px;
}

.wlm-profile-check.is-done {
    color: var(--ink);
}

.wlm-profile-check.is-done i {
    background: var(--ink);
    color: #fff;
}

.wlm-profile-tabs {
    position: sticky;
    top: 88px;
    z-index: 12;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(18px);
    scrollbar-width: none;
}

.wlm-profile-tabs::-webkit-scrollbar {
    display: none;
}

.wlm-profile-tabs a {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    padding: 0 15px;
    border-radius: 999px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
}

.wlm-profile-tabs a:hover,
.wlm-profile-tabs a.is-active {
    background: var(--ink);
    color: #fff;
}

.wlm-profile-content-section {
    padding: 22px;
}

.wlm-profile-section-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: end;
    margin-bottom: 16px;
}

.wlm-profile-section-head.compact {
    display: block;
}

.wlm-profile-section-head a {
    min-width: max-content;
    color: var(--ink);
    font-size: 13px;
    font-weight: 900;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.wlm-profile-two-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.wlm-profile-empty {
    display: grid;
    justify-items: start;
    padding: 24px;
    border: 1px dashed #dedede;
    border-radius: 28px;
    background:
        radial-gradient(circle at 100% 0%, rgba(255, 56, 92, 0.12), transparent 30%),
        var(--paper-soft);
}

.wlm-profile-empty-icon {
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background: #fff;
    color: var(--brand);
    font-size: 19px;
    box-shadow: var(--shadow-xs);
}

.wlm-profile-empty > span {
    margin-top: 16px;
    color: var(--brand);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.wlm-profile-empty strong {
    display: block;
    margin-top: 7px;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 22px;
    line-height: 1.05;
    letter-spacing: -0.045em;
    font-weight: 900;
}

.wlm-profile-empty p {
    max-width: 540px;
    margin-top: 9px;
}

.wlm-profile-empty a {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    margin-top: 16px;
    padding: 0 15px;
    border-radius: 999px;
    background: var(--ink);
    color: #fff;
    font-size: 13px;
    font-weight: 850;
}

.wlm-profile-empty a:hover {
    background: var(--brand);
}

.wlm-profile-community-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.wlm-profile-community-grid article {
    min-height: 156px;
    display: grid;
    align-content: space-between;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: var(--paper-soft);
}

.wlm-profile-community-grid i {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: #fff;
    color: var(--brand);
    box-shadow: var(--shadow-xs);
}

.wlm-profile-community-grid strong {
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 18px;
    line-height: 1.05;
    letter-spacing: -0.04em;
    font-weight: 900;
}

.wlm-profile-community-grid span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
}

.wlm-profile-social-card {
    background: #111;
    color: #fff;
}

.wlm-profile-social-card .wlm-card-kicker {
    color: #ff8fa3;
}

.wlm-profile-social-card h2 {
    color: #fff;
}

.wlm-profile-social-card p {
    color: rgba(255, 255, 255, 0.68);
}

.wlm-profile-public-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
    padding: 12px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.1);
}

.wlm-profile-public-preview strong,
.wlm-profile-public-preview span {
    display: block;
}

.wlm-profile-public-preview strong {
    color: #fff;
    font-size: 14px;
    font-weight: 900;
}

.wlm-profile-public-preview span {
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.62);
    font-size: 12px;
    font-weight: 750;
}

.wlm-profile-network-list {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.wlm-profile-network-list div {
    min-height: 68px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 0 14px;
    border-radius: 22px;
    background: var(--paper-soft);
}

.wlm-profile-network-list strong {
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 26px;
    letter-spacing: -0.05em;
    font-weight: 900;
}

.wlm-profile-network-list span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 850;
    text-align: right;
}

@media (max-width: 1240px) {
    .wlm-account-layout {
        grid-template-columns: minmax(0, 1fr) 280px;
    }
}

@media (max-width: 980px) {
    .wlm-account-identity-card {
        grid-template-columns: 138px minmax(0, 1fr);
        gap: 22px;
        padding: 142px 24px 22px;
    }

    .wlm-profile-avatar-xl {
        width: 138px;
        height: 138px;
        border-radius: 34px;
        font-size: 46px;
    }

    .wlm-profile-stat-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .wlm-account-layout {
        grid-template-columns: 1fr;
    }

    .wlm-account-right {
        position: relative;
        top: auto;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .wlm-account-right .wlm-profile-social-card {
        grid-column: 1 / -1;
    }
}

@media (max-width: 720px) {
    .wlm-account-page {
        padding-top: 16px;
    }

    .wlm-account-hero {
        border-radius: 32px;
    }

    .wlm-account-cover {
        height: 214px;
    }

    .wlm-account-cover-grid {
        right: -30px;
        top: 44px;
        width: 210px;
    }

    .wlm-account-identity-card {
        display: block;
        padding: 128px 16px 18px;
    }

    .wlm-profile-avatar-xl {
        width: 124px;
        height: 124px;
        border-width: 6px;
        border-radius: 32px;
        font-size: 42px;
    }

    .wlm-account-identity-main {
        padding-top: 16px;
    }

    .wlm-account-identity-main h1 {
        font-size: clamp(36px, 11vw, 52px);
        line-height: 0.96;
    }

    .wlm-profile-bio {
        font-size: 15px;
        line-height: 1.55;
    }

    .wlm-profile-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .wlm-profile-actions .btn,
    .wlm-profile-actions form,
    .wlm-profile-actions button {
        width: 100%;
    }

    .wlm-profile-stat-strip {
        grid-template-columns: 1fr;
        margin: 0 14px 14px;
        border-radius: 24px;
    }

    .wlm-profile-stat-strip div {
        min-height: 78px;
    }

    .wlm-account-right,
    .wlm-profile-two-grid,
    .wlm-profile-community-grid {
        grid-template-columns: 1fr;
    }

    .wlm-profile-tabs {
        top: 76px;
        border-radius: 24px;
    }

    .wlm-profile-section-head {
        display: block;
    }

    .wlm-profile-section-head a {
        display: inline-flex;
        margin-top: 12px;
    }

    .wlm-account-card,
    .wlm-profile-content-section {
        padding: 17px;
        border-radius: 28px;
    }

    .wlm-profile-empty {
        padding: 20px;
        border-radius: 24px;
    }
}

@media (max-width: 430px) {
    .wlm-profile-meta-row span {
        width: 100%;
        justify-content: center;
    }

    .wlm-profile-tabs a {
        min-height: 38px;
        padding: 0 13px;
        font-size: 12px;
    }
}

/* =========================================================
   User public profile route: /u/:handle
   ========================================================= */

.wlm-account-cover img {
    position: absolute;
    inset: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.04) contrast(0.96);
}

.wlm-profile-interest-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.wlm-profile-muted-pill {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    padding: 0 13px;
    border-radius: 999px;
    border: 1px dashed var(--border-strong);
    background: var(--paper-soft);
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.wlm-profile-public-preview {
    text-decoration: none;
    transition:
        transform 0.18s ease,
        background 0.18s ease;
}

.wlm-profile-public-preview:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.15);
}

.wlm-profile-public-preview.as-static:hover {
    transform: none;
}

.wlm-public-profile-page {
    padding-bottom: 12px;
}

.wlm-public-profile-hero {
    min-height: 440px;
}

.wlm-public-profile-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 22px;
    align-items: start;
    padding-top: 22px;
}

.wlm-public-profile-main {
    min-width: 0;
    display: grid;
    gap: 16px;
}

.wlm-public-profile-side {
    position: sticky;
    top: 96px;
    display: grid;
    gap: 16px;
}

.wlm-public-profile-empty {
    min-height: 260px;
}

@media (max-width: 1100px) {
    .wlm-public-profile-layout {
        grid-template-columns: 1fr;
    }

    .wlm-public-profile-side {
        position: relative;
        top: auto;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .wlm-public-profile-side {
        grid-template-columns: 1fr;
    }

    .wlm-public-profile-empty {
        min-height: auto;
    }
}

.wlm-account-cover img {
    z-index: 0;
}

.wlm-account-cover::after {
    z-index: 1;
    pointer-events: none;
}

.wlm-account-cover-orb,
.wlm-account-cover-grid {
    z-index: 2;
}

/* =========================================================
   Profile uploads - S3
   ========================================================= */

.wlm-profile-upload-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.wlm-profile-upload-card {
    position: relative;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 8px;
    overflow: hidden;
    padding: 16px;
    border: 1px dashed #d8d8d8;
    border-radius: 26px;
    background: linear-gradient(180deg, rgba(255, 248, 243, 0.88), rgba(255, 255, 255, 1));
    color: var(--ink);
    cursor: pointer;
    transition:
        border-color 0.18s ease,
        transform 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
}

.wlm-profile-upload-card:hover {
    transform: translateY(-1px);
    border-color: var(--brand);
    box-shadow: var(--shadow-sm);
}

.wlm-profile-upload-card input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.wlm-profile-upload-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 17px;
}

.wlm-profile-upload-card strong {
    position: relative;
    z-index: 1;
    color: var(--ink);
    font-size: 14px;
    line-height: 1.1;
    font-weight: 900;
}

.wlm-profile-upload-card small {
    position: relative;
    z-index: 1;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
    font-weight: 650;
}

.wlm-profile-upload-card.is-selected {
    border-style: solid;
    border-color: var(--brand);
    background: #fff;
}

.wlm-profile-upload-card.is-selected::after {
    content: "Lista para subir";
    position: absolute;
    right: 12px;
    top: 12px;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font-size: 11px;
    font-weight: 900;
}

@media (max-width: 720px) {
    .wlm-profile-upload-grid {
        grid-template-columns: 1fr;
    }

    .wlm-profile-upload-card {
        min-height: 132px;
        border-radius: 24px;
    }
}

/* =========================================================
   RESCATE FINAL - Editor de imagen tipo Facebook
   Solo agrega estilos necesarios para cámara, menú y recorte.
   No cambia grillas principales ni rompe el layout.
   ========================================================= */

.wlm-profile-file-input {
    position: fixed !important;
    left: -100vw !important;
    top: -100vh !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.wlm-account-cover img {
    position: relative;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.04) contrast(0.98);
}

.wlm-account-cover:has(img) .wlm-account-cover-orb,
.wlm-account-cover:has(img) .wlm-account-cover-grid {
    display: none;
}

.wlm-profile-avatar-wrap {
    position: relative;
    width: max-content;
    max-width: 100%;
}

.wlm-cover-media-control {
    position: absolute;
    right: 26px;
    top: 198px;
    z-index: 30;
}

.wlm-media-menu-trigger,
.wlm-avatar-media-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    background: #fff;
    color: var(--ink);
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.wlm-media-menu-trigger:hover,
.wlm-avatar-media-trigger:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.wlm-media-menu-trigger {
    min-height: 44px;
    padding: 0 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
}

.wlm-avatar-media-trigger {
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 6;
    width: 46px;
    height: 46px;
    border-radius: 999px;
    font-size: 16px;
}

.wlm-media-context-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    z-index: 80;
    width: 245px;
    display: grid;
    gap: 4px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(18px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    pointer-events: none;
    transition: opacity 0.16s ease, visibility 0.16s ease, transform 0.16s ease;
}

.wlm-media-context-menu.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.wlm-media-context-menu-avatar {
    left: 12px;
    right: auto;
    top: calc(100% + 10px);
}

.wlm-media-context-menu button {
    min-height: 44px;
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 9px;
    align-items: center;
    width: 100%;
    padding: 6px 10px;
    border: 0;
    border-radius: 16px;
    background: transparent;
    color: var(--ink);
    text-align: left;
    font-size: 13px;
    font-weight: 850;
    cursor: pointer;
}

.wlm-media-context-menu button:hover {
    background: var(--paper-soft);
}

.wlm-media-context-menu i {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--brand-soft);
    color: var(--brand);
}

body.wlm-media-modal-open {
    overflow: hidden;
}

.wlm-media-modal[hidden] {
    display: none !important;
}

.wlm-media-modal {
    position: fixed;
    inset: 0;
    z-index: 220;
    display: grid;
    place-items: center;
    padding: 22px;
}

.wlm-media-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.54);
    backdrop-filter: blur(8px);
}

.wlm-media-modal-panel {
    position: relative;
    z-index: 1;
    width: min(760px, 100%);
    max-height: 92vh;
    overflow: auto;
    padding: 18px;
    border-radius: 34px;
    background: #fff;
    box-shadow: var(--shadow-lg);
}

.wlm-media-modal-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    padding-bottom: 16px;
}

.wlm-media-modal-head span {
    color: var(--brand);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.wlm-media-modal-head h2 {
    margin: 5px 0 0;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 30px;
    line-height: 1;
    letter-spacing: -0.05em;
    font-weight: 900;
}

.wlm-media-modal-head p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
    font-weight: 650;
}

.wlm-media-modal-head > button {
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    cursor: pointer;
}

.wlm-media-crop-stage {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background:
        linear-gradient(45deg, #f2f2f2 25%, transparent 25%),
        linear-gradient(-45deg, #f2f2f2 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #f2f2f2 75%),
        linear-gradient(-45deg, transparent 75%, #f2f2f2 75%);
    background-color: #fff;
    background-size: 24px 24px;
    background-position: 0 0, 0 12px, 12px -12px, -12px 0;
    cursor: grab;
    user-select: none;
    touch-action: none;
}

.wlm-media-crop-stage:active {
    cursor: grabbing;
}

.wlm-media-crop-stage.is-avatar {
    width: min(460px, 100%);
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    border-radius: 999px;
}

.wlm-media-crop-stage.is-cover {
    width: 100%;
    aspect-ratio: 16 / 6.4;
}

.wlm-media-crop-stage img {
    position: absolute;
    left: 50%;
    top: 50%;
    max-width: none;
    transform-origin: center center;
    will-change: transform;
    pointer-events: none;
}

.wlm-media-zoom-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    margin-top: 16px;
    color: var(--muted);
}

.wlm-media-zoom-row input {
    width: 100%;
    accent-color: var(--brand);
}

.wlm-media-status {
    min-height: 20px;
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.wlm-media-status.is-error {
    color: var(--brand-dark);
}

.wlm-media-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
}

.wlm-media-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(12, 12, 16, 0.82);
    backdrop-filter: blur(6px);
    cursor: zoom-out;
    animation: wlm-lightbox-in 0.18s ease;
}

.wlm-media-lightbox img {
    max-width: min(92vw, 1100px);
    max-height: 88vh;
    border-radius: 18px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
}

@keyframes wlm-lightbox-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.wlm-profile-save-reminder {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 4px 0 2px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    background: var(--brand-soft);
    border: 1px solid rgba(255, 56, 92, 0.25);
    color: var(--brand-dark);
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.4;
}

.wlm-profile-save-reminder i {
    font-size: 15px;
}

@media (max-width: 720px) {
    .wlm-cover-media-control {
        top: 14px;
        right: 14px;
    }

    .wlm-media-menu-trigger {
        min-height: 40px;
        padding: 0 12px;
    }

    .wlm-media-menu-trigger span {
        display: none;
    }

    .wlm-avatar-media-trigger {
        width: 42px;
        height: 42px;
    }

    .wlm-media-context-menu-avatar {
        left: 0;
    }

    .wlm-media-modal {
        padding: 10px;
        align-items: end;
    }

    .wlm-media-modal-panel {
        width: 100%;
        max-height: 92dvh;
        border-radius: 28px 28px 0 0;
        padding: 14px;
    }

    .wlm-media-crop-stage.is-cover {
        aspect-ratio: 16 / 8.2;
    }

    .wlm-media-modal-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .wlm-media-modal-actions .btn {
        width: 100%;
        padding: 0 12px;
    }
}

/* =========================================================
   Modal "Editar perfil" + toasts de subida instantánea
   ========================================================= */

.wlm-edit-modal-panel {
    width: min(620px, 100%);
}

.wlm-edit-modal .wlm-profile-form {
    margin-top: 6px;
}

.wlm-edit-modal .auth-message {
    margin: 0 0 14px;
}

.wlm-edit-modal-note {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 2px 0 0;
    padding: 11px 14px;
    border-radius: var(--radius-sm, 18px);
    background: var(--paper-soft, #faf7f4);
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
    line-height: 1.45;
}

.wlm-edit-modal-note i {
    margin-top: 2px;
    color: var(--brand);
    font-size: 14px;
}

.wlm-edit-modal .wlm-media-modal-actions {
    margin-top: 4px;
}

.wlm-media-toast {
    position: fixed;
    left: 50%;
    bottom: 26px;
    z-index: 1300;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: min(92vw, 420px);
    padding: 12px 18px;
    border-radius: 999px;
    background: var(--ink, #16161a);
    color: #fff;
    font-size: 13.5px;
    font-weight: 800;
    line-height: 1.3;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
    transform: translateX(-50%);
    animation: wlm-toast-in 0.24s ease;
}

.wlm-media-toast i {
    flex: 0 0 auto;
    font-size: 15px;
    color: #6fe3a5;
}

.wlm-media-toast.is-error {
    background: var(--brand-dark, #c2103c);
}

.wlm-media-toast.is-error i {
    color: #ffd6df;
}

.wlm-media-toast.is-leaving {
    opacity: 0;
    transform: translateX(-50%) translateY(8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

@keyframes wlm-toast-in {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@media (max-width: 720px) {
    .wlm-edit-modal-panel {
        width: 100%;
    }

    .wlm-media-toast {
        bottom: 16px;
        width: calc(100vw - 28px);
        max-width: none;
        justify-content: center;
    }
}