/* ==========================================================================
   Aprodence — Auto Announcement Modal
   Matches the site theme: dark header band (#000/#1D1A27) + brand gradient
   linear-gradient(to right, #47F3F5 0%, #298E8F 97%)
   All selectors are namespaced with .apm- so nothing can clash with the theme.
   ========================================================================== */

/* Self-contained box model — do not depend on Bootstrap's reboot. */
.apm-root,
.apm-root *,
.apm-root *::before,
.apm-root *::after {
    box-sizing: border-box;
}

.apm-root {
    --apm-cyan: #47F3F5;
    --apm-cyan-soft: #45EEF0;
    --apm-teal: #298E8F;
    --apm-teal-mid: #21ADAF;
    --apm-ink: #1D1A27;
    --apm-ink-2: #3C3C4A;
    --apm-body: #FAFAFA;
    --apm-line: #E9E9E9;
    --apm-muted: #7D7D7D;
    --apm-grad: linear-gradient(to right, #47F3F5 0%, #298E8F 97%);
    --apm-gold: linear-gradient(135deg, #FFE9A8 0%, #E7B84E 45%, #C9902A 100%);
    --apm-gold-ink: #4A3208;

    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    font-family: 'Roboto', sans-serif;
    /* Hidden until JS opens it */
    visibility: hidden;
    pointer-events: none;
}

.apm-root[hidden] {
    display: none;
}

.apm-root.is-open {
    visibility: visible;
    pointer-events: auto;
}

/* ---------- Backdrop ---------- */
.apm-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(12, 12, 18, .72);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity .45s ease;
    cursor: pointer;
}

.apm-root.is-open .apm-backdrop {
    opacity: 1;
}

/* ---------- Dialog ---------- */
.apm-dialog {
    position: relative;
    width: 100%;
    max-width: 650px;
    max-height: calc(100vh - 48px);
    overflow: hidden auto;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
    opacity: 0;
    transform: translateY(28px) scale(.96);
    transition: opacity .5s ease, transform .5s cubic-bezier(.22, 1, .36, 1);
    -ms-overflow-style: none;
    scrollbar-width: thin;
}

/* Programmatic focus target on open — no visible ring needed. */
.apm-dialog:focus {
    outline: none;
}

.apm-dialog::-webkit-scrollbar {
    width: 6px;
}

.apm-dialog::-webkit-scrollbar-thumb {
    background: #d6d6d6;
    border-radius: 6px;
}

.apm-root.is-open .apm-dialog {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* ---------- Close button (same idea as .link_modal .btn-close) ---------- */
.apm-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 4;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 100%;
    background: #fff;
    color: var(--apm-ink);
    cursor: pointer;
    opacity: 1;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
    transition: transform .3s ease, background .3s ease, color .3s ease;
}

.apm-close svg {
    width: 14px;
    height: 14px;
    display: block;
}

.apm-close:hover,
.apm-close:focus-visible {
    background: var(--apm-teal);
    color: #fff;
    transform: rotate(90deg);
    outline: none;
}

/* ---------- Header band ---------- */
.apm-head {
    position: relative;
    overflow: hidden;
    background: var(--apm-ink);
    padding: 26px 30px 24px;
    text-align: center;
}

/* soft brand glow behind the logo */
.apm-head::before {
    content: "";
    position: absolute;
    top: -120px;
    left: 50%;
    width: 380px;
    height: 260px;
    transform: translateX(-50%);
    background: radial-gradient(closest-side, rgba(71, 243, 245, .28), rgba(71, 243, 245, 0));
    pointer-events: none;
}

/* gradient hairline at the bottom of the band */
.apm-head::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: var(--apm-grad);
}

.apm-logo {
    position: relative;
    display: block;
    width: 172px;
    max-width: 60%;
    height: auto;
    margin: 0 auto 16px;
}

.apm-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    border-radius: 100px;
    background: rgba(71, 243, 245, .10);
    border: 1px solid rgba(71, 243, 245, .35);
    color: var(--apm-cyan);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.apm-dot {
    width: 7px;
    height: 7px;
    border-radius: 100%;
    background: var(--apm-cyan);
    box-shadow: 0 0 0 0 rgba(71, 243, 245, .7);
    animation: apm-pulse 2s infinite;
}

@keyframes apm-pulse {
    70% {
        box-shadow: 0 0 0 9px rgba(71, 243, 245, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(71, 243, 245, 0);
    }
}

/* ---------- Body ---------- */
.apm-body {
    background: var(--apm-body);
    padding: 30px 34px 32px;
    text-align: center;
}

/* Sized to keep the headline on a single line from ~576px upwards.
   Deliberately no `white-space: nowrap` — if Roboto fails to load and the
   fallback font is wider, the title wraps instead of overflowing the card. */
.apm-title {
    margin: 0 0 14px;
    font-size: clamp(18px, calc(3.5vw - 4px), 22px);
    line-height: 1.32;
    font-weight: 700;
    color: #000;
}

/* the site's signature gradient-clipped emphasis */
.apm-title strong {
    display: inline;
    font-weight: 700;
    color: #298E8F;
}

.apm-text {
    margin: 0 0 16px;
    font-size: 16px;
    line-height: 1.7;
    color: #444;
}

.apm-text b {
    color: #000;
    font-weight: 700;
}

/* ---------- Offer block ---------- */
.apm-offer {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    text-align: left;
    margin: 22px 0 18px;
    /* extra top/left padding keeps the corner ribbon clear of the 10% badge */
    padding: 24px 20px 20px 40px;
    /* clips the ribbon ends against the card edges */
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--apm-line);
    border-left: 4px solid transparent;
    border-radius: 12px;
    background-image: linear-gradient(#fff, #fff), var(--apm-grad);
    background-origin: border-box;
    background-clip: padding-box, border-box;
}

/* Golden ribbon running diagonally across the top-left corner.
   Wider than the corner it covers, so `overflow: hidden` on .apm-offer
   trims both ends flush with the card edges. */
.apm-offer-flag {
    position: absolute;
    /* slid along its own axis so the text centres on the *visible* (clipped)
       part of the band, not on the full 150px strip */
    top: 9px;
    left: -54px;
    z-index: 3;
    width: 150px;
    padding: 6px 0;
    transform: rotate(-45deg);
    background: var(--apm-gold);
    color: var(--apm-gold-ink);
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 1.4px;
    text-align: center;
    text-transform: uppercase;
    text-shadow: 0 1px 0 rgba(255, 255, 255, .35);
    box-shadow: 0 3px 8px rgba(150, 105, 20, .35);
}

.apm-offer-tag {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 84px;
    padding: 10px 8px;
    border-radius: 10px;
    background: var(--apm-grad);
    color: #fff;
    line-height: 1;
}

.apm-offer-tag span {
    font-size: 24px;
    font-weight: 800;
}

.apm-offer-tag small {
    margin-top: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.6px;
    text-transform: uppercase;
}

.apm-offer p {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: #333;
}

.apm-offer p b {
    color: #000;
}

/* ---------- Service chips ---------- */
.apm-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 0 0 22px;
    padding: 0;
    list-style: none;
}

.apm-chips li {
    padding: 6px 14px;
    border-radius: 100px;
    background: #fff;
    border: 1px solid var(--apm-line);
    font-size: 13px;
    font-weight: 500;
    color: var(--apm-ink-2);
    transition: border-color .3s ease, color .3s ease, transform .3s ease;
}

.apm-chips li:hover {
    border-color: var(--apm-teal-mid);
    color: var(--apm-teal);
    transform: translateY(-2px);
}

/* ---------- Countdown ---------- */
.apm-countdown {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 0 0 24px;
}

.apm-countdown[hidden] {
    display: none;
}

.apm-unit {
    flex: 1 1 0;
    max-width: 92px;
    padding: 12px 6px;
    border-radius: 12px;
    background: var(--apm-ink);
    color: #fff;
}

.apm-unit b {
    display: block;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;

}

.apm-unit small {
    display: block;
    margin-top: 5px;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: #fff;
}

/* ---------- Actions ---------- */
.apm-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

.apm-btn {
    display: inline-block;
    vertical-align: top;
    padding: 13px 34px;
    border: 0;
    border-radius: 100px;
    background: var(--apm-cyan);
    background: var(--apm-grad);
    color: #06282A !important;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none !important;
    cursor: pointer;
    transition: all .5s;
    transition-timing-function: ease-out;
    box-shadow: 0 10px 24px rgba(41, 142, 143, .28);
}

.apm-btn:hover,
.apm-btn:focus-visible {
    color: #fff !important;
    background: var(--apm-ink);
    box-shadow: 0 12px 28px rgba(29, 26, 39, .35);
    transform: translateY(-2px);
    outline: none;
}

.apm-link {
    padding: 13px 10px;
    border: 0;
    background: none;
    color: var(--apm-muted);
    font-size: 14px;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    transition: color .3s ease;
}

.apm-link:hover,
.apm-link:focus-visible {
    color: var(--apm-teal);
    outline: none;
}

/* ---------- Footer line ---------- */
.apm-foot {
    margin: 0;
    padding-top: 18px;
    border-top: 1px solid var(--apm-line);
    font-size: 15px;
    font-weight: 700;
    color: #000;
}

/* ---------- Responsive ---------- */
@media (max-width: 575.98px) {
    .apm-root {
        padding: 14px 12px;
    }

    .apm-dialog {
        max-height: calc(100vh - 28px);
        border-radius: 14px;
    }

    .apm-head {
        padding: 18px 18px 16px;
    }

    .apm-logo {
        width: 132px;
        margin-bottom: 11px;
    }

    .apm-badge {
        font-size: 10px;
        letter-spacing: 1px;
        padding: 5px 12px;
    }

    .apm-body {
        padding: 20px 16px 22px;
    }

    .apm-title {
        font-size: 19px;
        margin-bottom: 10px;
    }

    .apm-text {
        font-size: 14.5px;
        margin-bottom: 12px;
    }

    .apm-offer {
        flex-direction: column;
        text-align: center;
        gap: 10px;
        margin: 16px 0 14px;
        padding: 20px 16px 16px;
    }

    .apm-offer-flag {
        top: 8px;
        left: -47px;
        width: 130px;
        padding: 5px 0;
        font-size: 10px;
        letter-spacing: 1.2px;
    }

    .apm-offer p {
        font-size: 14px;
    }

    /* The paragraph above already names every service — drop the
       duplicate chips on small screens to keep the modal on one screen. */
    .apm-chips {
        display: none;
    }

    .apm-countdown {
        gap: 7px;
        margin-bottom: 18px;
    }

    .apm-unit {
        padding: 10px 4px;
    }

    .apm-unit b {
        font-size: 19px;
    }

    .apm-unit small {
        font-size: 9px;
        letter-spacing: .8px;
    }

    .apm-actions {
        flex-direction: column;
        gap: 2px;
        margin-bottom: 14px;
    }

    .apm-btn {
        width: 100%;
        text-align: center;
    }

    .apm-foot {
        padding-top: 14px;
        font-size: 14px;
    }
}

/* ---------- Accessibility: reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {

    .apm-backdrop,
    .apm-dialog,
    .apm-btn,
    .apm-close,
    .apm-chips li {
        transition: none !important;
    }

    .apm-dialog {
        transform: none;
    }

    .apm-dot {
        animation: none;
    }
}