/* ====== GENERELT WRAP / CARD ====== */

.elcard-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0 auto 16px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.elcard {
    position: relative;
    width: 100%;
    border-radius: 10px;
    padding: 32px 28px 15px 28px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

/* Grøn label i toppen */
.elcard-pill {
    position: absolute;
    top: 0px;
    left: 0px;
    background: #d1fae5;
    color: #047857;
    padding: 5px 15px;
    border-bottom-right-radius: 8px;
    border-top-left-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Hoved-layout: 4 kolonner */
.elcard-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

/* ====== KOLONNER ====== */

.elcard-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.elcard-col-logo {
    flex: 0 0 140px;
}

.elcard-col-info {
    min-width: 0;
    padding-right: 16px;
}

.elcard-col-price {
    flex: 0 0 180px;
    text-align: right;
}

.elcard-col-cta {
    display: flex;
    flex-direction: column;
    align-items: center; /* højrestil knap + tooltip */
    gap: 6px;
}
.elcard-logo-link {
    font-size: 11px;
    color: #969696;
    text-decoration: underline;
    text-underline-offset: 2px;
    text-align: center;
}
.elcard-logo-link:hover {
    color: #1d4ed8;
}
.elcard-price-month {
    margin-top: 4px;
    font-size: 12px;
    color: #4b5563;
}


/* ====== LOGO ====== */

.elcard-logo {
    width: 140px;
    height: 60px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
}

.elcard-logo img {
    max-width: 90%;
    max-height: 80%;
    object-fit: contain;
}

/* ====== PRODUKTINFO (MIDTERKOLONNE) ====== */

.elcard-provider-name {
    font-size: 14px;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 2px;
}

.elcard-title {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
}

/* Pristype / Binding tags */
.elcard-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}


.elcard-tag-label {
    font-weight: 500;
    margin-right: 4px;
    color: #065f46;
}

.elcard-tag-value {
    font-weight: 600;
    color: #065f46;
}

/* ====== PRIS (3. KOLONNE) ====== */

.elcard-price-block {
    text-align: right;
}

.elcard-price-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6b7280;
    font-weight: 600;
    margin-bottom: 2px;
}

.elcard-price-value {
    font-size: 26px;
    font-weight: 800;
    color: #16a34a;
    line-height: 1.1;
    white-space: nowrap;
}

.elcard-price-unit {
    font-size: 14px;
    font-weight: 500;
    color: #16a34a;
    margin-left: 3px;
}

/* ====== CTA (4. KOLONNE) ====== */

.elcard-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    min-width: 200px;
    border-radius: 999px;
    background: #2563eb;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.40);
    transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.08s ease;
    margin: 0;
}

.elcard-cta:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.45);
}

.elcard-cta:active {
    transform: translateY(0);
    box-shadow: 0 3px 8px rgba(37, 99, 235, 0.25);
}

/* ====== "Hvordan er prisen udregnet?" + TOOLTIP ====== */

.elcard-breakdown-trigger {
    position: relative;
    font-size: 10px;
    color: #6b7280;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: default;
}

.elcard-info-icon {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    border: 1px solid #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    font-weight: 600;
    color: #6b7280;
    background: #ffffff;
}

.elcard-breakdown-text {
    text-decoration: underline;
    text-decoration-style: dotted;
}

/* Tooltip-boks */
.elcard-tooltip {
    position: absolute;
    right: 0;
    top: 140%;
    width: 280px;
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
    padding: 10px 12px;
    font-size: 12px;
    color: #4b5563;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s ease;
    z-index: 50;
}

.elcard-breakdown-trigger:hover .elcard-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Tooltip-indhold */
.elcard-tooltip-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #111827;
}

.elcard-tooltip-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3px;
}

.elcard-tooltip-row:last-child {
    margin-bottom: 0;
}

.elcard-tooltip-divider {
    margin: 6px 0;
    border-top: 1px dashed #e5e7eb;
}

.elcard-tooltip-row-strong {
    font-weight: 600;
}
.elcard-tooltip-disclaimer {
    margin-top: 8px;
    padding-top: 4px;
    border-top: 1px solid #f3f4f6;
    font-size: 10px;
    line-height: 1.4;
    color: #9ca3af;
}
.elcard-tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px 3px 8px;
    border-radius: 999px;
    background: #e8f7ed;
    font-size: 12px;
    color: #065f46;
    gap: 6px; /* afstand mellem ikon og tekst */
}

/* Ikon (checkmark) */
.elcard-tag-icon {
    width: 12px;
    height: 12px;
    display: inline-block;
    background-color: #065f46; /* mørk grøn */
    mask-size: cover;
    mask-repeat: no-repeat;
    mask-position: center;
    mask-image: url('data:image/svg+xml;utf8,<svg fill="none" stroke="%23065f46" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M5 13l4 4L19 7"/></svg>');
}
.elcard-tooltip {
    position: absolute;
    transform: translateY(4px);
}
/* ====== ØST / VEST SLIDER ====== */

.elcard-area-toggle {
    width: 100%;
    margin: 0 0 24px;
    display: flex;
    justify-content: center;
}

.elcard-area-toggle-inner {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 3px;
    border-radius: 999px;
    background: #f3f4f6;
    box-shadow: 0 4px 14px rgba(148, 163, 184, 0.45);
    overflow: hidden;
}

/* Den blå "thumb" der glider under den aktive knap */
.elcard-area-toggle-thumb {
    position: absolute;
    z-index: 1;
    top: 3px;
    bottom: 3px;
    left: 3px;
    width: calc(50% - 3px);
    border-radius: 999px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.45);
    transition: transform 0.20s ease;
    transform: translateX(0); /* DK1 som default */
}

/* Når DK2 er aktiv: flyt thumb til højre */
.elcard-area-toggle-inner[data-active-area="DK2"] .elcard-area-toggle-thumb {
    transform: translateX(100%);
}

/* Knapperne */
.elcard-area-toggle-button {
    position: relative;
    z-index: 2; /* over thumb */
    flex: 1 1 0;
    border: none;
    background: transparent;
    padding: 6px 18px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    color: #4b5563;
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
    transition: color 0.15s ease, transform 0.10s ease;
}

/* Aktiv knap – kun tekst/skygge ændres, ikke baggrund */
.elcard-area-toggle-button.is-active {
    color: #ffffff;
    transform: translateY(-0.5px);
    background: #2563eb;
}

/* Hover på inaktiv knap */
.elcard-area-toggle-button:not(.is-active):hover {
    color: #111827;
}

/* Lidt tighter på mobil */
@media (max-width: 720px) {
    .elcard-area-toggle {
        margin-bottom: 18px;
    }

    .elcard-area-toggle-inner {
        width: 100%;
        max-width: 260px;
    }

    .elcard-area-toggle-button {
        font-size: 12px;
        padding: 6px 10px;
    }
}






/* ====== RESPONSIV ====== */

@media (max-width: 900px) {
    .elcard-main {
        gap: 16px;
    }

    .elcard-col-price {
        flex: 0 0 150px;
    }

    .elcard-col-cta {
        flex: 0 0 150px;
    }
}

@media (max-width: 720px) {

    .elcard {
        padding: 36px 5px 15px 5px;
    }

    /* Kampagne-label */
    .elcard-pill {
        align-self: center;
        margin-bottom: 8px;
        text-align: center;
    }

    /* Hele kortet stacker vertikalt og centrerer */
    .elcard-main {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 10px;
        width: 100%;
    }

    /* Kolonner fylder 100% og centrerer deres indhold */
    .elcard-col-logo,
    .elcard-col-info,
    .elcard-col-price,
    .elcard-col-cta {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        flex: 0;
        padding: 0px;
    }

    /* Logo */
    .elcard-logo {
        width: 120px;
        height: 52px;
        margin: 0 auto;
    }

    /* Læs anmeldelse link */
    .elcard-logo-link {
        font-size: 11px;
        margin-top: 6px;
        margin-left: auto;
        margin-right: auto;
    }

    /* Titel */
    .elcard-title {
        font-size: 28px;
        line-height: 1.2;
        margin-top: 6px;
        margin-bottom: 2px;
    }

    /* Tags */
    .elcard-tags {
        justify-content: center;
        width: 100%;
        margin-top: 6px;
        gap: 8px;
    }

    /* Pris */
    .elcard-col-price {
        padding-top:10px;
        text-align: center;
        width: 100%;
    }

    .elcard-price-block {
        text-align: center;
    }

    .elcard-price-label {
        font-size: 11px;
    }

    .elcard-price-value {
        font-size: 36px;
    }

    .elcard-price-month {
        font-size: 12px;
        margin-top: 2px;
    }

    /* CTA-knap i fuld bredde men pæn max */
    .elcard-col-cta {
        margin-top: 6px;
    }

    .elcard-cta {
        width: 95%;
        justify-content: center;
    }

    /* Breakdown link */
    .elcard-breakdown-trigger {
        margin-top: 8px;
        font-size: 11px;
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }

    /* Tooltip placeres fornuftigt */
    .elcard-tooltip {
        right: auto;
        left: 50%;
        transform: translateX(-50%) translateY(4px);
        width: 90vw;
        max-width: 320px;
        text-align: left;
    }
    /* Fix tooltip på mobil */
.elcard-tooltip {
    position: fixed !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 90vw !important;
    max-width: 350px !important;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 9999;
}
    .elcard-area-toggle {
        margin-bottom: 18px;
    }

    .elcard-area-toggle-inner {
        width: 100%;
        max-width: 260px;
    }

    .elcard-area-toggle-button {
        font-size: 12px;
        padding: 6px 10px;
    }

}
