/* =============================================================
   POPUPS — generic modal chrome. Hidden by default; assets/js/popups.js
   adds .is-open when triggered. Backdrop click + × button + Escape
   all close (cookie set unless always_show).
   ============================================================= */
.wecom-popup {
    position: fixed;
    inset: 0;
    z-index: 999999999;
    display: none;
}

.wecom-popup.is-open {
    display: flex;
    align-items: center;
    justify-content: center;
}

body.wecom-popup-open {
    overflow: hidden;
}

.wecom-popup__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    cursor: pointer;
}

.wecom-popup__panel {
    position: relative;
    margin: auto;
    max-width: 760px;
    width: calc(100% - 32px);

    display: flex;
    flex-direction: column;

    background: var(--color-white);
    border-radius: 12px;
    box-shadow: 6.55px 6.55px 26.202px 0 rgba(255, 61, 0, 0.20);
    padding: 40px 32px 32px;
    max-height: 90vh;
}

.wecom-popup__close {
    position: absolute;
    top: 5px;
    left: 5px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.wecom-popup__close img {
    width: 12px;
    height: 12px;
}

.wecom-popup__close:hover,
.wecom-popup__close:focus {
    background: rgba(0, 0, 0, 0.05);
    outline: none;
}

.wecom-popup__title {
    color: var(--color-primary);
    font-size: 28px;
    line-height: 1.2;
    font-weight: 700;
    margin: 0 0 16px;
    text-align: center;
}

.wecom-popup__content {
    display: flex;
    flex-direction: column;

    font-size: 16px;
    line-height: 1.5;
    color: var(--color-text-muted);

    overflow-y: auto;
}

.wecom-popup__content p {
    margin: 0 0 12px;
}

.wecom-popup__content p:last-child {
    margin-block-end: 0;
}

.wecom-popup__content h2,
.wecom-popup__content h3 {
    margin: 0 0 8px;
    color: var(--color-primary);
}

.wecom-popup__content h2:not(:first-child),
.wecom-popup__content h3:not(:first-child) {
    margin: 16px 0 8px;
}

.wecom-popup__content h2 {
    font-size: 22px;
}

.wecom-popup__content h3 {
    font-size: 16px;
}

.wecom-popup__content img {
    display: inline-block;
}

.wecom-popup__content a {
    color: var(--color-primary);
    text-decoration: underline;
}

.wecom-popup__content ul,
.wecom-popup__content ol {
    margin: 0 0 12px;
}

.wecom-popup__content li,
.wecom-popup__content p {
    font-size: 16px;
    line-height: 1.35;
}

.wecom-popup__content li {
    margin-block-end: 4px;
}

@media (max-width: 600px) {
    .wecom-popup__panel {
        margin: 3vh auto;
        padding: 32px 20px 24px;
        max-height: 94vh;
    }

    .wecom-popup__title {
        font-size: 22px;
    }

    .wecom-popup__content {
        font-size: 14px;
    }
}

/* =============================================================
   PLAN MODIFIER — dark wefly-style panel. Used by wefly plan
   detail popups (675, 679–686). Seeded content carries its
   own two-tone title in .popup-plan-title, so the renderer's
   .wecom-popup__title is hidden inside this variant.
   ============================================================= */
.wecom-popup--plan .popup-plan-title {
    font-family: "Rubik", sans-serif;
    font-weight: 700;
    font-size: 32px;
    line-height: 1.25;
    text-align: center;
    margin: 0 0 18px;
}

.wecom-popup--plan .wecom-popup__content p {
    margin: 0 0 12px;
}

.wecom-popup--plan .wecom-popup__content a {
    text-decoration: underline;
}

.wecom-popup--plan .popup-plan-cta {
    margin: 14px 0 16px;
    text-align: center;
    font-weight: 600;
}

.wecom-popup--plan .popup-plan-cta a {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 4px;
    background: var(--color-primary);
    font-weight: 700;
    color: var(--color-white);
    text-decoration: none;
}

.wecom-popup--plan .popup-plan-cta a:hover {
    text-decoration: underline;
}

.wecom-popup--plan .popup-plan-note {
    border-top: 1px solid #828282;
    margin-top: 18px;
    padding-top: 12px;
    font-size: 12px;
    line-height: 1.5;
    color: #828282;
    text-align: right;
}

@media (max-width: 600px) {
    .wecom-popup--plan .wecom-popup__panel {
        padding: 28px 22px 22px;
    }

    .wecom-popup--plan .popup-plan-title {
        font-size: 26px;
    }

    .wecom-popup--plan .wecom-popup__content {
        font-size: 13px;
    }
}

.wecom-popup__country-groups {
    display: flex;
    flex-direction: column;
    gap: 15px 0;
}

.wecom-popup__country-group {
    display: flex;
    flex-direction: row;
    gap: 0 25px;
    padding-left: 24px;
}

.wecom-popup__country-group-letter,
.wecom-popup__country-group-countries {
    font-size: 16px;
}

.wecom-popup__country-group-letter {
    width: 100%;
    max-width: 35px;
    flex-shrink: 0;

    font-weight: 600;
    color: var(--color-primary);
    text-align: center;
}

.wecom-popup__country-group-countries {
    width: 100%;
    text-align: center;
}