/* OffGridVolt Toolkit — popups */

.ogvbp-popup[hidden] { display: none !important; }

.ogvbp-popup {
    --ogvbp-navy: #034A7A;
    --ogvbp-orange: #E08200;
    position: fixed;
    z-index: 99999;
    font-family: inherit;
}

.ogvbp-popup__overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .65);
    animation: ogvbp-fade .25s ease;
}

.ogvbp-popup__panel {
    position: relative;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
    overflow: hidden;
}

/* ── Centre modal ─────────────────────────────────────────────────────────── */
.ogvbp-popup--center {
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.ogvbp-popup--center .ogvbp-popup__panel {
    width: 100%;
    max-width: 460px;
    max-height: 90vh;
    overflow-y: auto;
    animation: ogvbp-pop .28s cubic-bezier(.2, .9, .3, 1.2);
}

/* ── Bottom bar ───────────────────────────────────────────────────────────── */
.ogvbp-popup--bar {
    left: 0;
    right: 0;
    bottom: 0;
}
.ogvbp-popup--bar .ogvbp-popup__panel {
    border-radius: 0;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 4px 20px;
    animation: ogvbp-slide-up .3s ease;
    border-top: 3px solid var(--ogvbp-orange);
}
.ogvbp-popup--bar .ogvbp-popup__content {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
    flex-wrap: wrap;
    padding: 12px 0;
}
.ogvbp-popup--bar .ogvbp-popup__title { margin: 0; font-size: 16px; }
.ogvbp-popup--bar .ogvbp-popup__body { flex: 1; min-width: 200px; }
.ogvbp-popup--bar .ogvbp-popup__body p { margin: 0; }
.ogvbp-popup--bar .ogvbp-popup__image { max-width: 70px; border-radius: 6px; }
.ogvbp-popup--bar .ogvbp-popup__dismiss { display: none; }

/* ── Corner box ───────────────────────────────────────────────────────────── */
.ogvbp-popup--corner {
    right: 20px;
    bottom: 20px;
    max-width: calc(100vw - 40px);
}
.ogvbp-popup--corner .ogvbp-popup__panel {
    width: 340px;
    max-width: 100%;
    animation: ogvbp-slide-up .3s ease;
}

/* ── Image-only layout ────────────────────────────────────────────────────── */
/* The banner creative carries its own headline and button, so the panel is
   nothing but the image: no padding, no chrome, no text below it. */
.ogvbp-popup--layout-image .ogvbp-popup__panel {
    background: transparent;
    line-height: 0;           /* kills the inline-image descender gap */
}

.ogvbp-popup__banner {
    display: block;
    text-decoration: none;
}
.ogvbp-popup__banner img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
}

/* Bottom-bar banners span the viewport, so square off the corners. */
.ogvbp-popup--bar.ogvbp-popup--layout-image .ogvbp-popup__panel { padding: 0; border-top: 0; }
.ogvbp-popup--bar.ogvbp-popup--layout-image .ogvbp-popup__banner img { border-radius: 0; }

/* ── Shared internals ─────────────────────────────────────────────────────── */
.ogvbp-popup__image {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

.ogvbp-popup__content { padding: 24px; }

.ogvbp-popup__title {
    margin: 0 0 10px;
    font-size: 21px;
    line-height: 1.25;
    font-weight: 700;
    color: var(--ogvbp-navy);
}

.ogvbp-popup__body {
    font-size: 14.5px;
    line-height: 1.6;
    color: #374151;
}
.ogvbp-popup__body p:last-child { margin-bottom: 0; }

.ogvbp-popup__cta {
    display: inline-block;
    margin-top: 18px;
    padding: 12px 26px;
    background: var(--ogvbp-orange);
    color: #fff !important;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none !important;
    border-radius: 8px;
    transition: background .2s ease, transform .2s ease;
}
.ogvbp-popup__cta:hover {
    background: #c47200;
    transform: translateY(-1px);
}

.ogvbp-popup__dismiss {
    display: block;
    margin: 12px 0 0;
    padding: 0;
    background: none;
    border: 0;
    color: #9ca3af;
    font-size: 12.5px;
    text-decoration: underline;
    cursor: pointer;
}
.ogvbp-popup__dismiss:hover { color: #6b7280; }

.ogvbp-popup__close {
    position: absolute;
    top: 8px;
    right: 10px;
    z-index: 2;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, .85);
    border: 0;
    border-radius: 50%;
    color: #4b5563;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: background .2s ease;
}
.ogvbp-popup__close:hover { background: #f3f4f6; }

/* ── Animations ───────────────────────────────────────────────────────────── */
@keyframes ogvbp-fade     { from { opacity: 0 } to { opacity: 1 } }
@keyframes ogvbp-pop      { from { opacity: 0; transform: scale(.94) translateY(8px) } to { opacity: 1; transform: none } }
@keyframes ogvbp-slide-up { from { transform: translateY(100%) } to { transform: none } }

@media (prefers-reduced-motion: reduce) {
    .ogvbp-popup *, .ogvbp-popup__overlay { animation: none !important; transition: none !important; }
}

/* ── Mobile ───────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .ogvbp-popup--corner { left: 12px; right: 12px; bottom: 12px; }
    .ogvbp-popup--corner .ogvbp-popup__panel { width: 100%; }
    .ogvbp-popup--bar .ogvbp-popup__panel { flex-direction: column; align-items: stretch; padding: 8px 16px 16px; }
    .ogvbp-popup--bar .ogvbp-popup__content { flex-direction: column; align-items: flex-start; gap: 10px; }
    .ogvbp-popup__content { padding: 20px; }
    .ogvbp-popup__title { font-size: 18px; }
    .ogvbp-popup__cta { display: block; text-align: center; }
}
