/* Popup comunidade — visual idêntico ao modelo Discord */
.aln-community-popup {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.82);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.aln-community-popup.is-open {
    opacity: 1;
    visibility: visible;
}

.aln-community-popup__dialog {
    position: relative;
    width: 100%;
    max-width: 22.5rem;
    background: #1e1f22;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 1rem;
    box-shadow: 0 1.25rem 3.5rem rgba(0, 0, 0, 0.65);
    padding: 1.35rem 1.15rem 1.15rem;
    box-sizing: border-box;
    transform: translateY(10px) scale(0.98);
    transition: transform 0.25s ease;
}

.aln-community-popup.is-open .aln-community-popup__dialog {
    transform: translateY(0) scale(1);
}

.aln-community-popup__close {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    width: 1.85rem;
    height: 1.85rem;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #dcddde;
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.aln-community-popup__close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.aln-community-popup__title {
    margin: 0 1.75rem 1rem 0;
    text-align: left;
    font-family: 'Segoe UI', system-ui, Arial, sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: #f2f3f5;
    letter-spacing: 0.01em;
}

.aln-community-popup__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.6rem;
}

.aln-community-popup__tab {
    padding: 0.4rem 0.6rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.3rem;
    background: #2b2d31;
    color: #b5bac1;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
}

.aln-community-popup__tab.is-active {
    background: #5865f2;
    border-color: #5865f2;
    color: #fff;
}

.aln-community-popup__widget-wrap {
    border-radius: 0.55rem;
    overflow: hidden;
    margin-bottom: 0.85rem;
    background: #2b2d31;
    min-height: 14rem;
    max-height: min(32rem, 58vh);
}

.aln-community-popup__widget-wrap:has(.aln-discord-mock--presence) {
    min-height: 16rem;
    max-height: min(34rem, 60vh);
}

.aln-discord-mock--presence .aln-discord-presence__groups {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 17rem;
    overflow-y: auto;
    padding-right: 0.2rem;
    scrollbar-width: thin;
    scrollbar-color: #d1b88e #1a1b1e;
}

.aln-discord-presence__heading {
    margin: 0 0 0.4rem;
    padding: 0.35rem 0.5rem;
    border-radius: 0.35rem;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.aln-discord-presence__heading--online {
    color: #b8f5c8;
    background: rgba(59, 165, 92, 0.22);
    border: 1px solid rgba(59, 165, 92, 0.55);
    box-shadow: 0 0 12px rgba(59, 165, 92, 0.2);
}

.aln-discord-presence__heading--afk {
    color: #ffe8b0;
    background: rgba(250, 166, 26, 0.15);
    border: 1px solid rgba(250, 166, 26, 0.45);
    opacity: 0.92;
}

.aln-discord-presence__group--online .aln-discord-mock__list {
    margin-bottom: 0.15rem;
}

.aln-discord-presence__group--afk {
    opacity: 0.88;
    filter: saturate(0.85);
}

.aln-discord-mock__line {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex: 1;
    min-width: 0;
}

.aln-discord-mock__call {
    flex-shrink: 0;
    max-width: 52%;
    padding: 0.12rem 0.4rem;
    border-radius: 0.3rem;
    font-size: 0.62rem;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.aln-discord-mock__call--online {
    color: #d4ffd4;
    background: rgba(59, 165, 92, 0.28);
    border: 1px solid rgba(59, 165, 92, 0.5);
}

.aln-discord-mock__call--afk {
    color: #ffe4a8;
    background: rgba(250, 166, 26, 0.2);
    border: 1px solid rgba(250, 166, 26, 0.4);
}

.aln-discord-mock__row--online {
    border-color: rgba(59, 165, 92, 0.55);
    background: rgba(20, 48, 32, 0.5);
    box-shadow: inset 0 0 0 1px rgba(59, 165, 92, 0.12);
}

.aln-discord-mock__row--afk {
    border-color: rgba(250, 166, 26, 0.4);
    background: rgba(48, 36, 12, 0.45);
    opacity: 0.9;
}

.aln-discord-status-dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    flex-shrink: 0;
}

.aln-discord-status-dot--online {
    background: #3ba55c;
    box-shadow: 0 0 6px rgba(59, 165, 92, 0.65);
}

.aln-discord-status-dot--afk {
    background: #faa61a;
    box-shadow: 0 0 6px rgba(250, 166, 26, 0.5);
}

.aln-discord-status-dot--offline {
    background: #747f8d;
}

.aln-discord-mock__user {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 45%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}

.aln-community-popup__dialog:has(.aln-community-popup__discord-iframe) {
    max-width: 24.5rem;
    padding-left: 1rem;
    padding-right: 1rem;
}

.aln-community-popup__widget-wrap:has(.aln-community-popup__discord-iframe) {
    min-height: 31rem;
    max-height: min(32rem, 72vh);
    background: #2b2d31;
}

.aln-community-popup__discord-iframe {
    display: block;
    width: 100%;
    min-height: 31rem;
    height: 500px;
    max-height: min(500px, 68vh);
    border: 0;
    background: transparent;
}

/* Preview estilo Discord (sem widgetId) */
.aln-discord-mock {
    display: flex;
    flex-direction: column;
    min-height: 18.5rem;
    background: #313338;
    text-align: left;
    font-family: 'Segoe UI', system-ui, Arial, sans-serif;
}

.aln-discord-mock__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.65rem 0.75rem;
    background: #5865f2;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
}

.aln-discord-mock__brand {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.aln-discord-mock__logo {
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 50%;
    background: #fff;
    color: #5865f2;
    font-size: 0.65rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.aln-discord-mock__online {
    font-size: 0.72rem;
    font-weight: 500;
    opacity: 0.95;
    white-space: nowrap;
}

.aln-discord-mock__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 0.65rem 0.75rem 0.5rem;
    background: #2b2d31;
}

.aln-discord-mock__label {
    margin: 0 0 0.5rem;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #949ba4;
    flex-shrink: 0;
}

.aln-discord-mock--calls .aln-discord-mock__body {
    padding-bottom: 0.35rem;
}

.aln-discord-calls__list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-height: 15.5rem;
    overflow-x: hidden;
    overflow-y: auto;
    padding-right: 0.2rem;
    margin-bottom: 0.35rem;
    scrollbar-width: thin;
    scrollbar-color: #d1b88e #1a1b1e;
}

.aln-discord-calls__list::-webkit-scrollbar {
    width: 6px;
}

.aln-discord-calls__list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #d1b88e, #9a7b4f);
    border-radius: 3px;
}

.aln-discord-call {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.4rem;
    background: rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.aln-discord-call.is-active {
    border-color: rgba(59, 165, 92, 0.55);
    background: rgba(20, 48, 32, 0.45);
}

.aln-discord-call.is-empty .aln-discord-call__name {
    color: #949ba4;
}

.aln-discord-call__head {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.38rem 0.5rem;
    font-size: 0.72rem;
    color: #dbdee1;
}

.aln-discord-call__icon {
    flex-shrink: 0;
    font-size: 0.85rem;
    line-height: 1;
    opacity: 0.9;
}

.aln-discord-call__name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}

.aln-discord-call__count {
    flex-shrink: 0;
    min-width: 1.35rem;
    padding: 0.1rem 0.35rem;
    border-radius: 0.25rem;
    background: #1e1f22;
    color: #949ba4;
    font-size: 0.65rem;
    font-weight: 700;
    text-align: center;
}

.aln-discord-call.is-active .aln-discord-call__count {
    background: #248046;
    color: #fff;
}

.aln-discord-call__members {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0 0.45rem 0.4rem;
}

.aln-discord-call__member {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.68rem;
    color: #b5bac1;
}

.aln-discord-call__more {
    margin: 0 0 0.15rem;
    padding-left: 1.6rem;
    font-size: 0.62rem;
    color: #949ba4;
}

.aln-discord-mock__label--sub {
    margin-top: 0.15rem;
    margin-bottom: 0.35rem;
}

.aln-discord-mock__list--compact {
    max-height: 6.5rem;
}

.aln-discord-mock__list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    max-height: 14rem;
    overflow-x: hidden;
    overflow-y: auto;
    padding-right: 0.25rem;
    scrollbar-width: thin;
    scrollbar-color: #d1b88e #1a1b1e;
}

.aln-discord-mock__list::-webkit-scrollbar {
    width: 6px;
}

.aln-discord-mock__list::-webkit-scrollbar-track {
    background: #1a1b1e;
    border-radius: 3px;
}

.aln-discord-mock__list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #d1b88e, #9a7b4f);
    border-radius: 3px;
}

.aln-discord-mock__row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.55rem;
    font-size: 0.78rem;
    color: #dbdee1;
    border: 1px solid rgba(209, 184, 142, 0.42);
    border-radius: 0.45rem;
    background: rgba(12, 10, 8, 0.45);
    box-shadow: inset 0 0 0 1px rgba(255, 220, 160, 0.06);
    flex-shrink: 0;
}

.aln-discord-mock__row:hover {
    border-color: rgba(209, 184, 142, 0.65);
    background: rgba(28, 22, 14, 0.55);
}

.aln-discord-mock__avatar {
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #5865f2, #3ba55c);
    flex-shrink: 0;
}

.aln-discord-mock__meta {
    margin-left: auto;
    font-size: 0.65rem;
    color: #949ba4;
}

.aln-discord-live__avatar {
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.aln-discord-mock__empty {
    margin: 0.35rem 0 0;
    font-size: 0.76rem;
    color: #b5bac1;
    line-height: 1.4;
}

.aln-widget-disabled-notice {
    margin: 0 0 0.65rem;
    padding: 0.55rem 0.65rem;
    border-radius: 0.4rem;
    border: 1px solid rgba(250, 180, 80, 0.45);
    background: rgba(80, 55, 20, 0.45);
    font-size: 0.72rem;
    line-height: 1.45;
    color: #ffe4b8;
}

.aln-widget-disabled-notice strong {
    color: #fff3d6;
}

.aln-discord-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 18.5rem;
    padding: 1rem;
    font-size: 0.82rem;
    color: #b5bac1;
    text-align: center;
}

.aln-discord-mock__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.55rem 0.75rem;
    background: #232428;
    font-size: 0.68rem;
    color: #b5bac1;
}

.aln-discord-mock__foot a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.68rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    background: #4e5058;
}

.aln-community-popup__btn {
    display: block;
    width: 100%;
    margin-bottom: 0.55rem;
    padding: 0.82rem 1rem;
    border: none;
    border-radius: 0.4rem;
    font-family: 'Segoe UI', system-ui, Arial, sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
    transition: filter 0.15s ease, transform 0.12s ease;
}

.aln-community-popup__btn:hover:not(:disabled) {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

.aln-community-popup__btn--discord {
    background: #5865f2;
    color: #fff;
}

.aln-community-popup__btn--whatsapp {
    background: #25d366;
    color: #fff;
}

.aln-community-popup__btn--whatsapp.is-disabled {
    background: #3d5c45;
    color: rgba(255, 255, 255, 0.5);
    cursor: not-allowed;
    transform: none;
}

.aln-community-popup__btn--later {
    background: transparent;
    color: #b5bac1;
    border: 1px solid #4e5058;
    font-weight: 600;
    margin-bottom: 0;
}

.aln-community-popup__btn--later:hover {
    background: rgba(255, 255, 255, 0.04);
    color: #dcddde;
}

