/* promo popup (end of year sale)
   - markup sits at the bottom of each view, wrapped in <% if (promo.active) { %>, copy comes from server/config/promo.json
   - behavior (delay, remember closed, esc key) is in common/promo-popup.js
   - desktop / laptop / tablet: centered card that fades + scales in
   - mobile: card slides up from the bottom of the screen */

@media(min-width: 1366px) {
    .promo-popup {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1000000;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        opacity: 0;
        visibility: hidden;
        transition: 0.4s opacity ease-out, 0.4s visibility ease-out;
    }
    .promo-popup-active {
        opacity: 1;
        visibility: visible;
    }
    .promo-popup-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.6);
    }
    .promo-popup-card {
        position: relative;
        width: 540px;
        max-width: calc(100% - 40px);
        background: #fff;
        border-top: 6px solid var(--primary-color);
        border-radius: 16px;
        padding: 44px 40px 36px 40px;
        text-align: center;
        box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
        transform: translateY(20px) scale(0.96);
        transition: 0.45s transform cubic-bezier(0.22, 1, 0.36, 1);
    }
    .promo-popup-active .promo-popup-card {
        transform: none;
    }
    .promo-popup-close {
        position: absolute;
        top: 10px;
        right: 12px;
        width: 36px;
        height: 36px;
        border: none;
        background: transparent;
        color: #999;
        font-size: 30px;
        line-height: 1;
        cursor: pointer;
        transition: 0.15s color ease-out;
    }
    .promo-popup-close:hover {
        color: var(--font-color);
    }
    .promo-popup-badge {
        display: inline-block;
        font-family: 'owners-text', sans-serif;
        font-size: 13px;
        font-weight: 700;
        letter-spacing: 1.5px;
        text-transform: uppercase;
        color: var(--primary-color);
        background: rgba(204, 32, 37, 0.08);
        border-radius: 100px;
        padding: 7px 14px;
        margin: 0 0 18px 0;
    }
    .promo-popup-card h2 {
        font-size: 34px;
        font-weight: 700;
        line-height: 1.2;
        color: var(--font-color);
        margin: 0 0 14px 0;
    }
    .promo-popup-card h2 span {
        color: var(--primary-color);
    }
    .promo-popup-card p {
        font-family: 'owners-text', sans-serif;
        font-size: 16px;
        line-height: 1.6;
        color: #555;
        margin: 0 0 24px 0;
    }
    .promo-popup-cta {
        display: block;
        width: 100%;
        font-family: 'owners-text', sans-serif;
        font-size: 16px;
        font-weight: 700;
        letter-spacing: 1px;
        text-transform: uppercase;
        color: #fff;
        background: var(--primary-color);
        text-decoration: none;
        border-radius: 10px;
        padding: 16px 20px;
        transition: 0.15s all ease-out;
    }
    .promo-popup-cta:hover {
        opacity: 0.92;
        box-shadow: 0 10px 24px rgba(204, 32, 37, 0.35);
    }
    .promo-popup-call {
        display: block;
        font-family: 'owners-text', sans-serif;
        font-size: 15px;
        font-weight: 600;
        color: var(--font-color);
        text-decoration: none;
        margin: 14px 0 0 0;
        transition: 0.15s color ease-out;
    }
    .promo-popup-call:hover {
        color: var(--primary-color);
    }
    .promo-popup-card .promo-popup-fine {
        font-size: 12px;
        line-height: 1.5;
        color: #9a9a9a;
        margin: 18px 0 0 0;
    }
}

@media(max-width: 1366px) and (min-width: 1024px) {
    .promo-popup {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1000000;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        opacity: 0;
        visibility: hidden;
        transition: 0.4s opacity ease-out, 0.4s visibility ease-out;
    }
    .promo-popup-active {
        opacity: 1;
        visibility: visible;
    }
    .promo-popup-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.6);
    }
    .promo-popup-card {
        position: relative;
        width: 520px;
        max-width: calc(100% - 40px);
        background: #fff;
        border-top: 6px solid var(--primary-color);
        border-radius: 16px;
        padding: 40px 36px 32px 36px;
        text-align: center;
        box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
        transform: translateY(20px) scale(0.96);
        transition: 0.45s transform cubic-bezier(0.22, 1, 0.36, 1);
    }
    .promo-popup-active .promo-popup-card {
        transform: none;
    }
    .promo-popup-close {
        position: absolute;
        top: 10px;
        right: 12px;
        width: 36px;
        height: 36px;
        border: none;
        background: transparent;
        color: #999;
        font-size: 30px;
        line-height: 1;
        cursor: pointer;
        transition: 0.15s color ease-out;
    }
    .promo-popup-close:hover {
        color: var(--font-color);
    }
    .promo-popup-badge {
        display: inline-block;
        font-family: 'owners-text', sans-serif;
        font-size: 13px;
        font-weight: 700;
        letter-spacing: 1.5px;
        text-transform: uppercase;
        color: var(--primary-color);
        background: rgba(204, 32, 37, 0.08);
        border-radius: 100px;
        padding: 7px 14px;
        margin: 0 0 18px 0;
    }
    .promo-popup-card h2 {
        font-size: 32px;
        font-weight: 700;
        line-height: 1.2;
        color: var(--font-color);
        margin: 0 0 14px 0;
    }
    .promo-popup-card h2 span {
        color: var(--primary-color);
    }
    .promo-popup-card p {
        font-family: 'owners-text', sans-serif;
        font-size: 16px;
        line-height: 1.6;
        color: #555;
        margin: 0 0 24px 0;
    }
    .promo-popup-cta {
        display: block;
        width: 100%;
        font-family: 'owners-text', sans-serif;
        font-size: 16px;
        font-weight: 700;
        letter-spacing: 1px;
        text-transform: uppercase;
        color: #fff;
        background: var(--primary-color);
        text-decoration: none;
        border-radius: 10px;
        padding: 16px 20px;
        transition: 0.15s all ease-out;
    }
    .promo-popup-cta:hover {
        opacity: 0.92;
        box-shadow: 0 10px 24px rgba(204, 32, 37, 0.35);
    }
    .promo-popup-call {
        display: block;
        font-family: 'owners-text', sans-serif;
        font-size: 15px;
        font-weight: 600;
        color: var(--font-color);
        text-decoration: none;
        margin: 14px 0 0 0;
        transition: 0.15s color ease-out;
    }
    .promo-popup-call:hover {
        color: var(--primary-color);
    }
    .promo-popup-card .promo-popup-fine {
        font-size: 12px;
        line-height: 1.5;
        color: #9a9a9a;
        margin: 18px 0 0 0;
    }
}

@media(max-width: 1024px) and (min-width: 769px) {
    .promo-popup {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1000000;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        opacity: 0;
        visibility: hidden;
        transition: 0.4s opacity ease-out, 0.4s visibility ease-out;
    }
    .promo-popup-active {
        opacity: 1;
        visibility: visible;
    }
    .promo-popup-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.6);
    }
    .promo-popup-card {
        position: relative;
        width: 480px;
        max-width: calc(100% - 40px);
        background: #fff;
        border-top: 6px solid var(--primary-color);
        border-radius: 16px;
        padding: 40px 32px 30px 32px;
        text-align: center;
        box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
        transform: translateY(20px) scale(0.96);
        transition: 0.45s transform cubic-bezier(0.22, 1, 0.36, 1);
    }
    .promo-popup-active .promo-popup-card {
        transform: none;
    }
    .promo-popup-close {
        position: absolute;
        top: 10px;
        right: 12px;
        width: 36px;
        height: 36px;
        border: none;
        background: transparent;
        color: #999;
        font-size: 30px;
        line-height: 1;
        cursor: pointer;
        transition: 0.15s color ease-out;
    }
    .promo-popup-close:hover {
        color: var(--font-color);
    }
    .promo-popup-badge {
        display: inline-block;
        font-family: 'owners-text', sans-serif;
        font-size: 12px;
        font-weight: 700;
        letter-spacing: 1.5px;
        text-transform: uppercase;
        color: var(--primary-color);
        background: rgba(204, 32, 37, 0.08);
        border-radius: 100px;
        padding: 7px 14px;
        margin: 0 0 16px 0;
    }
    .promo-popup-card h2 {
        font-size: 28px;
        font-weight: 700;
        line-height: 1.2;
        color: var(--font-color);
        margin: 0 0 12px 0;
    }
    .promo-popup-card h2 span {
        color: var(--primary-color);
    }
    .promo-popup-card p {
        font-family: 'owners-text', sans-serif;
        font-size: 15px;
        line-height: 1.6;
        color: #555;
        margin: 0 0 22px 0;
    }
    .promo-popup-cta {
        display: block;
        width: 100%;
        font-family: 'owners-text', sans-serif;
        font-size: 15px;
        font-weight: 700;
        letter-spacing: 1px;
        text-transform: uppercase;
        color: #fff;
        background: var(--primary-color);
        text-decoration: none;
        border-radius: 10px;
        padding: 15px 20px;
        transition: 0.15s all ease-out;
    }
    .promo-popup-cta:hover {
        opacity: 0.92;
        box-shadow: 0 10px 24px rgba(204, 32, 37, 0.35);
    }
    .promo-popup-call {
        display: block;
        font-family: 'owners-text', sans-serif;
        font-size: 15px;
        font-weight: 600;
        color: var(--font-color);
        text-decoration: none;
        margin: 14px 0 0 0;
        transition: 0.15s color ease-out;
    }
    .promo-popup-call:hover {
        color: var(--primary-color);
    }
    .promo-popup-card .promo-popup-fine {
        font-size: 12px;
        line-height: 1.5;
        color: #9a9a9a;
        margin: 16px 0 0 0;
    }
}

@media(max-width: 769px) {
    /* mobile: slide-in from the bottom instead of a centered popup */
    .promo-popup {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1000000;
        display: block;
        opacity: 0;
        visibility: hidden;
        transition: 0.4s opacity ease-out, 0.4s visibility ease-out;
    }
    .promo-popup-active {
        opacity: 1;
        visibility: visible;
    }
    .promo-popup-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.45);
    }
    .promo-popup-card {
        position: absolute;
        left: 0;
        bottom: 0;
        width: 100%;
        background: #fff;
        border-top: 5px solid var(--primary-color);
        border-radius: 18px 18px 0 0;
        padding: 30px 22px 22px 22px;
        text-align: center;
        box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.35);
        transform: translateY(110%);
        transition: 0.45s transform cubic-bezier(0.22, 1, 0.36, 1);
    }
    .promo-popup-active .promo-popup-card {
        transform: none;
    }
    .promo-popup-close {
        position: absolute;
        top: 6px;
        right: 8px;
        width: 40px;
        height: 40px;
        border: none;
        background: transparent;
        color: #999;
        font-size: 30px;
        line-height: 1;
        cursor: pointer;
        transition: 0.15s color ease-out;
    }
    .promo-popup-close:hover {
        color: var(--font-color);
    }
    .promo-popup-badge {
        display: inline-block;
        font-family: 'owners-text', sans-serif;
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 1.5px;
        text-transform: uppercase;
        color: var(--primary-color);
        background: rgba(204, 32, 37, 0.08);
        border-radius: 100px;
        padding: 6px 12px;
        margin: 0 0 12px 0;
    }
    .promo-popup-card h2 {
        font-size: 24px;
        font-weight: 700;
        line-height: 1.2;
        color: var(--font-color);
        margin: 0 0 10px 0;
    }
    .promo-popup-card h2 span {
        color: var(--primary-color);
    }
    .promo-popup-card p {
        font-family: 'owners-text', sans-serif;
        font-size: 14px;
        line-height: 1.55;
        color: #555;
        margin: 0 0 18px 0;
    }
    .promo-popup-cta {
        display: block;
        width: 100%;
        font-family: 'owners-text', sans-serif;
        font-size: 15px;
        font-weight: 700;
        letter-spacing: 1px;
        text-transform: uppercase;
        color: #fff;
        background: var(--primary-color);
        text-decoration: none;
        border-radius: 10px;
        padding: 15px 20px;
        transition: 0.15s all ease-out;
    }
    .promo-popup-cta:hover {
        opacity: 0.92;
        box-shadow: 0 10px 24px rgba(204, 32, 37, 0.35);
    }
    .promo-popup-call {
        display: block;
        font-family: 'owners-text', sans-serif;
        font-size: 15px;
        font-weight: 600;
        color: var(--font-color);
        text-decoration: none;
        margin: 12px 0 0 0;
        transition: 0.15s color ease-out;
    }
    .promo-popup-call:hover {
        color: var(--primary-color);
    }
    .promo-popup-card .promo-popup-fine {
        font-size: 11px;
        line-height: 1.5;
        color: #9a9a9a;
        margin: 14px 0 0 0;
    }
}
