/* Popup ad (banner popup) for corporate_new.
   Same markup/class contract as the legacy top/egged/couponia popup so the
   shared /js/popup.js drives it unchanged:
     .popup_div            - the fixed shell; JS toggles inline opacity/visibility
                             and adds/removes .minimized (never `display`), so
                             none of those properties may be !important here.
     .pop_content          - the card (buttons row + image)
     .close_btn            - dismiss for 30 days (cookie keyed by image filename)
     .minimize_btn         - collapse to .plus_btn_fixed
     .popup_content_div    - wraps the linked <img> read by popup.js
     .plus_btn_fixed       - restore handle; JS toggles inline display block/none
   corporate_new does not link the repo-root /css/global.css (where the legacy
   rules live), hence this component copy. z-index sits above page content and
   the sticky header but below the mobile drawer (10000) so an open drawer still
   covers the popup. */

.popup_div {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    justify-items: center;
    max-height: 100vh;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    z-index: 9000;
    transition: opacity .4s ease, visibility .4s ease, transform .4s ease;
}

/* Minimized: slide out toward the bottom-right corner where .plus_btn_fixed sits. */
.popup_div.minimized {
    transform: translate(100%, 100%);
}

.pop_content {
    display: inline-block;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

/* The buttons row is .pop_btn > ul > li — flex the <ul>, not the wrapper,
   or the two buttons stack vertically. */
.pop_btn ul {
    display: flex;
    justify-content: flex-start;
    margin: 0;
    padding: 0;
}

.pop_btn li {
    list-style: none;
}

.pop_btn li a {
    width: 45px;
    height: 45px;
    display: block;
    background: #fff;
    position: relative;
    transition: background-color .15s ease;
}

.pop_btn li a:hover {
    background: #d4d4d4;
}

.pop_btn li .minimize_btn {
    padding: 12px;
    border-top-right-radius: 10px;
}

.pop_btn li .close_btn {
    padding: 14px;
    border-top-left-radius: 10px;
}

.pop_btn li a img {
    max-width: 100%;
}

.popup_content_div {
    display: block;
    width: 100%;
    line-height: 0; /* kill the inline-image descender gap under the banner */
}

.popup_content_div a {
    display: block;
}

.pop_content img {
    max-width: 100%;
    height: auto;
}

.plus_btn_fixed {
    width: 60px;
    height: 60px;
    line-height: 60px;
    background: #fff;
    position: fixed;
    bottom: 0;
    right: 20px;
    padding: 0 20px;
    border-radius: 10px 10px 0 0;
    display: none;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, .15);
    z-index: 9001;
}

.plus_btn_fixed img {
    max-width: 100%;
}

@media (max-width: 767px) {
    .pop_content {
        max-width: 100%;
    }

    .plus_btn_fixed {
        width: 50px;
        height: 50px;
        line-height: 50px;
        padding: 0 15px;
        right: 10px;
    }
}
