/* OS360 Connect — banner styles. Self-contained, theme-agnostic. */

.os360c-banner {
    box-sizing: border-box;
    margin: 28px 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 60%, #172554 100%);
    color: #f1f5f9;
    padding: 22px 26px;
    position: relative;
    overflow: hidden;
    font-family: inherit;
}

.os360c-banner::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: linear-gradient(180deg, #38bdf8, #6366f1);
}

.os360c-banner-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    flex-wrap: wrap;
}

.os360c-text { flex: 1 1 320px; min-width: 0; }

.os360c-headline {
    margin: 0 0 6px !important;
    font-size: 19px;
    line-height: 1.35;
    font-weight: 700;
    color: #ffffff;
}

.os360c-body {
    margin: 0 0 8px !important;
    font-size: 14.5px;
    line-height: 1.5;
    color: #cbd5e1;
}

.os360c-offer {
    display: block;
    margin: 4px 0 0 !important;
    font-size: 12.5px;
    font-weight: 500;
    color: #94a3b8;
}

.os360c-cta {
    flex: 0 0 auto;
    display: inline-block;
    background: linear-gradient(90deg, #38bdf8, #6366f1);
    color: #ffffff !important;
    font-weight: 700;
    font-size: 15px;
    padding: 12px 26px;
    border-radius: 8px;
    text-decoration: none !important;
    box-shadow: 0 4px 14px rgba(56, 189, 248, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    white-space: nowrap;
}

.os360c-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.45);
    color: #ffffff !important;
}

/* Sticky bottom bar — light, thin, native-feeling notice bar (not a promo card) */
.os360c-sticky {
    display: none; /* JS reveals it unless snoozed */
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999; /* below typical chat-widget launchers (Tawk.to etc. use 999999+) */
    margin: 0;
    border-radius: 0;
    background: #ffffff;
    color: #0f172a;
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -2px 12px rgba(15, 23, 42, 0.06);
    padding: 10px 84px 10px 18px; /* right clearance for chat launcher bubble */
}

@media (max-width: 640px) {
    .os360c-sticky { padding-right: 18px; padding-bottom: 64px; } /* chat bubble sits above on mobile */
}

.os360c-sticky::before { display: none; }

.os360c-sticky .os360c-banner-inner { gap: 14px; }
.os360c-sticky .os360c-icon { width: 22px; height: 22px; color: #4f46e5; }
.os360c-sticky .os360c-headline { font-size: 14px; font-weight: 600; color: #0f172a; margin-bottom: 0 !important; }
.os360c-sticky .os360c-body { display: none; }
.os360c-sticky .os360c-offer {
    font-size: 11px;
    color: #64748b;
    background: transparent;
    border: none;
    padding: 0;
    font-weight: 500;
}
.os360c-sticky .os360c-cta {
    background: #4f46e5;
    box-shadow: none;
    padding: 8px 18px;
    font-size: 13.5px;
    border-radius: 6px;
}
.os360c-sticky .os360c-cta:hover { background: #4338ca; box-shadow: none; transform: none; }

.os360c-dismiss {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    background: transparent;
    border: 0;
    color: #94a3b8;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 6px;
}

.os360c-sticky .os360c-dismiss:hover { color: #0f172a; }
.os360c-thankyou .os360c-dismiss:hover,
.os360c-blog .os360c-dismiss:hover { color: #0f172a; }

/* Thank-you bar variant (used only if a banner keeps style:"bar" here) — light, on-brand */
.os360c-thankyou:not(.os360c-popup) {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #0f172a;
}
.os360c-thankyou:not(.os360c-popup)::before { background: linear-gradient(180deg, #22c55e, #06b6d4); }
.os360c-thankyou:not(.os360c-popup) .os360c-headline { color: #0f172a; }
.os360c-thankyou:not(.os360c-popup) .os360c-body { color: #475569; }
.os360c-thankyou:not(.os360c-popup) .os360c-icon { color: #16a34a; }


/* Icon + kicker */
.os360c-icon { flex: 0 0 auto; width: 40px; height: 40px; color: #7dd3fc; }
.os360c-icon svg { width: 100%; height: 100%; }
.os360c-kicker {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6366f1;
    margin-bottom: 4px;
}
.os360c-sticky .os360c-icon { width: 26px; height: 26px; }

/* Blog variant — light editorial callout, not an ad card */
.os360c-blog {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #0f172a;
}
.os360c-blog::before { background: linear-gradient(180deg, #6366f1, #38bdf8); }
.os360c-blog .os360c-headline { color: #0f172a; }
.os360c-blog .os360c-body { color: #475569; }
.os360c-blog .os360c-icon { color: #6366f1; }
.os360c-blog .os360c-offer { color: #64748b; }

/* Thank-you bar variant: bigger headline, green CTA (popup variant has its own styling above) */
.os360c-thankyou:not(.os360c-popup) .os360c-headline { font-size: 22px; }
.os360c-thankyou:not(.os360c-popup) .os360c-cta { background: linear-gradient(90deg, #22c55e, #06b6d4); box-shadow: 0 4px 14px rgba(34, 197, 94, 0.3); }

/* Hidden until JS repositions it (product fallback render) */
.os360c-fallback { display: none !important; }

@media (max-width: 640px) {
    .os360c-icon { display: none; }
}

/* ── Popup style: light, animated, two-column with product screenshot ──────
   Colors come from --os360c-primary / --os360c-secondary, set inline per
   banner from the OS 360 admin theme settings (server/modules/wp-connect). */

.os360c-popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(3px);
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.os360c-popup-overlay.os360c-show { display: flex; opacity: 1; }

.os360c-popup {
    --os360c-primary: #4f46e5;
    --os360c-secondary: #06b6d4;
    margin: 0;
    max-width: 880px;
    width: 100%;
    max-height: 90vh;
    overflow: auto;
    background: #ffffff;
    color: #0f172a;
    border-radius: 20px;
    padding: 0;
    box-shadow: 0 25px 70px rgba(15, 23, 42, 0.35);
    transform: translateY(24px) scale(0.97);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.os360c-popup-overlay.os360c-show .os360c-popup { transform: translateY(0) scale(1); }
.os360c-popup::before { display: none; }

.os360c-popup-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    align-items: stretch;
    gap: 0;
}

.os360c-popup-copy {
    padding: 44px 40px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.os360c-kicker-pill {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--os360c-primary);
    background: color-mix(in srgb, var(--os360c-primary) 12%, white);
    border-radius: 999px;
    padding: 6px 14px;
}

.os360c-popup .os360c-headline {
    font-size: 27px;
    line-height: 1.25;
    color: #0f172a;
    margin: 0 !important;
}

.os360c-popup .os360c-body {
    font-size: 15px;
    color: #475569;
    margin: 0 !important;
}

.os360c-bullets {
    list-style: none;
    margin: 4px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 9px;
}
.os360c-bullets li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: #1e293b;
    font-weight: 500;
}
.os360c-bullets .os360c-check {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--os360c-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}
.os360c-bullets .os360c-check svg { width: 12px; height: 12px; }

.os360c-popup .os360c-cta {
    align-self: flex-start;
    margin-top: 10px;
    background: linear-gradient(90deg, var(--os360c-primary), var(--os360c-secondary));
    box-shadow: 0 8px 20px color-mix(in srgb, var(--os360c-primary) 35%, transparent);
    padding: 13px 28px;
    font-size: 15px;
    border-radius: 9px;
}
.os360c-popup .os360c-cta:hover { transform: translateY(-1px); }

.os360c-popup-media {
    position: relative;
    background: linear-gradient(160deg, color-mix(in srgb, var(--os360c-primary) 8%, #f8fafc), color-mix(in srgb, var(--os360c-secondary) 10%, #f8fafc));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
}
.os360c-popup-media img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.18);
    animation: os360c-float 4.5s ease-in-out infinite;
}
.os360c-popup-media::before {
    content: "";
    position: absolute;
    top: -30%;
    right: -20%;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--os360c-secondary) 40%, transparent), transparent 70%);
    animation: os360c-pulse 3.5s ease-in-out infinite;
}

.os360c-popup .os360c-dismiss {
    z-index: 2;
    top: 14px;
    right: 14px;
    transform: none;
    background: #f1f5f9;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 18px;
    color: #64748b;
}
.os360c-popup .os360c-dismiss:hover { background: #e2e8f0; color: #0f172a; }

@keyframes os360c-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
@keyframes os360c-pulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.85; transform: scale(1.12); }
}

@media (prefers-reduced-motion: reduce) {
    .os360c-popup-media img,
    .os360c-popup-media::before { animation: none; }
}

@media (max-width: 760px) {
    .os360c-popup-grid { grid-template-columns: 1fr; }
    .os360c-popup-media { order: -1; padding: 20px 20px 0; }
    .os360c-popup-copy { padding: 28px 24px 32px; }
    .os360c-popup .os360c-headline { font-size: 22px; }
}

/* Checkout consent note (injected under the email field) */
.os360c-consent {
    font-size: 11.5px;
    color: #6b7280;
    margin: 4px 0 0 !important;
    line-height: 1.4;
}

@media (max-width: 640px) {
    .os360c-banner { padding: 18px; }
    .os360c-banner-inner { gap: 12px; }
    .os360c-cta { width: 100%; text-align: center; white-space: normal; }
    .os360c-sticky { padding: 12px 44px 12px 16px; }
    .os360c-sticky .os360c-cta { width: auto; }
}
