/* Almind Auto – Rabatkort – Design B */

.aa-discounts-heading {
    margin-bottom: 34px;
}

.aa-discounts-heading h2 {
    margin: 0 0 12px;
    color: #fff;
    font-size: clamp(2rem, 3.5vw, 3rem);
    letter-spacing: -.04em;
}

.aa-discounts-heading p {
    max-width: 760px;
    margin: 0;
    color: #c7c9cf;
    font-size: 1.05rem;
    line-height: 1.75;
}

.aa-discount-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.aa-discount-card {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-width: 0;
    min-height: 300px;
    overflow: hidden;
    isolation: isolate;
    border: 1px solid rgba(255,255,255,.17);
    border-radius: 13px;
    background-color: #1d2025;
    background-position: center;
    background-size: cover;
    color: #fff;
    transition:
        transform .25s ease,
        box-shadow .25s ease;
}

.aa-discount-card::before {
    position: absolute;
    z-index: 0;
    inset: 0;
    content: "";
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(
        180deg,
        rgba(0,0,0,.05) 5%,
        rgba(0,0,0,.35) 42%,
        rgba(0,0,0,.94) 100%
    );
}

.aa-discount-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,.25);
}

.aa-discount-card-content {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 22px;
}

.aa-discount-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-bottom: 15px;
    border-radius: 50%;
    background: #d51e2d;
    color: #fff;
    font-size: 1.35rem;
    font-weight: 800;
}

.aa-discount-card h3 {
    margin: 0 0 9px;
    color: #fff;
    font-size: 1.25rem;
    line-height: 1.25;
}

.aa-discount-card p {
    margin: 0;
    color: #e1e1e4;
    font-size: .9rem;
    line-height: 1.55;
}

.aa-discount-status {
    display: inline-block;
    margin-top: 18px;
    padding: 6px 10px;
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 5px;
    background: rgba(0,0,0,.3);
    color: #fff;
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .08em;
}

.aa-discount-veteran {
    background-image:
        url('/assets/images/discounts/veteran.webp');
}

.aa-discount-military {
    background-image:
        url('/assets/images/discounts/military.webp');
}

.aa-discount-responder {
    background-image:
        url('/assets/images/discounts/first-responder.webp');
}

.aa-discount-default {
    background-image:
        url('/assets/images/discounts/default.webp');
}

.aa-discounts-page .aa-discounts-coming-soon {
    max-width: none;
    margin-top: 20px;
}

@media (max-width: 1100px) {
    .aa-discount-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 650px) {
    .aa-discount-grid {
        grid-template-columns: 1fr;
    }

    .aa-discount-card {
        min-height: 290px;
    }

    .aa-discount-card-content {
        padding: 25px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .aa-discount-card {
        transition: none;
    }

    .aa-discount-card:hover {
        transform: none;
    }
}


/* Rabatkort – ensartet mørk kant og skygge */
.aa-discount-card {
    border: none;
    border-radius: 13px;
    background-clip: border-box;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}

.aa-discount-card::before {
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,.08) 0%,
        rgba(0,0,0,.40) 40%,
        rgba(0,0,0,.90) 80%,
        rgba(0,0,0,.98) 100%
    );
}


/* Rabatkort – billedudsnit */
.aa-discount-card {
    background-size: cover;
    background-position: center 35%;
    background-repeat: no-repeat;
}

/* Almind Auto: hvide originale rabatlogoer i eksisterende roede cirkler */
.aa-discount-icon .aa-discount-logo {
    display: block;
    width: 29px;
    height: 29px;
    object-fit: contain;
}
.aa-discount-icon .aa-discount-logo--military {
    width: 25px;
    height: 31px;
}


/* Rabatkort – ensartede små logoer */
.aa-discount-card .aa-discount-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    overflow: hidden;
    border-radius: 50%;
    background: #d51e2d;
}

.aa-discount-card .aa-discount-icon img {
    display: block;
    width: 28px;
    height: 28px;
    max-width: 28px;
    max-height: 28px;
    object-fit: contain;
    margin: 0;
    padding: 0;
}


/* First Responder – hvidt skjold */
.aa-discount-responder .aa-discount-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: 50%;
    background: #d51e2d;
}

.aa-discount-responder .aa-discount-icon img {
    display: block;
    width: 28px;
    height: 28px;
    max-width: 28px;
    max-height: 28px;
    object-fit: contain;
    margin: 0;
    padding: 0;
}


/* Almind Auto – rabat-popup 3.3.6F.6 */

.aa-discount-card[data-aa-discount-open] {
    cursor: pointer;
}

.aa-discount-card[data-aa-discount-open]:focus-visible {
    outline: 3px solid #e52b3b;
    outline-offset: 4px;
}

.aa-discount-status--active {
    background: #d51e2d;
    border-color: #d51e2d;
    color: #fff;
    font-size: .76rem;
    padding: 9px 13px;
}

.aa-discount-modal[hidden] {
    display: none !important;
}

.aa-discount-modal {
    position: fixed;
    z-index: 99999;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.aa-discount-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.78);
}

.aa-discount-modal-dialog {
    position: relative;
    width: min(100%, 540px);
    max-height: min(85vh, 760px);
    overflow-y: auto;
    padding: 38px;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 16px;
    background: #1b1d22;
    color: #fff;
    box-shadow: 0 25px 80px rgba(0,0,0,.5);
}

.aa-discount-modal-dialog h2 {
    margin: 15px 0;
    font-size: clamp(1.6rem, 4vw, 2.3rem);
    color: #fff;
}

.aa-discount-modal-percent {
    display: inline-block;
    margin: 4px 0 26px;
    padding: 12px 18px;
    border-radius: 8px;
    background: #d51e2d;
    color: #fff;
    font-size: 1.15rem;
    font-weight: 800;
}

.aa-discount-modal-field {
    margin-top: 20px;
}

.aa-discount-modal-field strong {
    display: block;
    margin-bottom: 7px;
    color: #fff;
    font-size: .9rem;
}

.aa-discount-modal-field p {
    margin: 0;
    color: #c7c9cf;
    line-height: 1.7;
    white-space: pre-line;
}

.aa-discount-modal-close {
    position: absolute;
    top: 14px;
    right: 17px;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
}

body.aa-discount-modal-open {
    overflow: hidden;
}

@media (max-width: 650px) {
    .aa-discount-modal-dialog {
        padding: 30px 22px;
    }
}


/* Almind Auto – kompakte rabatmarkeringer 3.3.6F.6.2 */

/* Samme dimensioner som KOMMER SNART */
.aa-discount-card .aa-discount-status--active {
    display: inline-block;
    margin-top: 18px;
    padding: 6px 10px;
    border: 1px solid #d51e2d;
    border-radius: 5px;
    background: #d51e2d;
    color: #fff;
    font-size: .66rem;
    font-weight: 800;
    line-height: normal;
    letter-spacing: .08em;
}

/* Kompakt rabatmarkering i popup */
.aa-discount-modal .aa-discount-modal-percent {
    display: inline-block;
    margin: 4px 0 20px;
    padding: 7px 12px;
    border: 1px solid #d51e2d;
    border-radius: 5px;
    background: #d51e2d;
    color: #fff;
    font-size: .82rem;
    font-weight: 800;
    line-height: 1.4;
    letter-spacing: .06em;
}
