/*
 * ClearCare Launch Announcements. Bespoke artwork for the ClearCare 2.0
 * launch modal and banner.
 *
 * Designed to BLEND with the rest of the app:
 *   Gradient matches the dealer sidebar (#1976D2 -> #1565C0) so it reads
 *   as the same brand, not a foreign Stripe-style overlay.
 *   Buttons reuse Bootstrap .btn .btn-primary chrome.
 *   Chip pills mirror the dashboard stat-card vivid accent colours.
 *   Logo lockup uses the real ClearCare wordmark (image01-1.jpg) instead
 *   of a generic icon tile.
 */

:root {
    /* Launch palette. Refined dark royal-blue to deep navy. Sits darker than
       the dealer sidebar (#1976D2 -> #1565C0) so the banner reads as a
       distinct, more premium element rather than blending into the chrome. */
    --cc-launch-grad-from: #1E40AF;  /* royal blue, darker than sidebar */
    --cc-launch-grad-mid:  #1E3A8A;  /* deep navy */
    --cc-launch-grad-to:   #172554;  /* near-black indigo */
    --cc-launch-cta-from:  #2563EB;
    --cc-launch-cta-to:    #1D4ED8;
    --cc-launch-ink:       #0F172A;
    --cc-launch-muted:     #475569;
    --cc-launch-line:      #E2E8F0;
    --cc-launch-band:      #FAFAFB;

    /* Vivid chip accents that mirror the dashboard stat-card palette
       (magenta / cyan / orange / green) but tuned slightly for chip use. */
    --cc-chip-cyan:  #00BCD4;
    --cc-chip-blue:  #1976D2;
    --cc-chip-green: #4CAF50;
    --cc-chip-amber: #FF9800;
}

/* =========================================================================
   LaunchModal artwork (rendered inside Bootstrap .modal)
   ========================================================================= */
.cc-launch-modal-card {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow:
        0 24px 56px -16px rgba(15, 23, 42, 0.40),
        0  3px 10px  -3px rgba(15, 23, 42, 0.10);
    background: #FFFFFF;
}

.cc-launch-modal-art {
    position: relative;
    height: 128px;
    background:
        radial-gradient(110% 80% at 100% 0%, rgba(255, 255, 255, 0.16), transparent 55%),
        linear-gradient(135deg,
            var(--cc-launch-grad-from) 0%,
            var(--cc-launch-grad-mid)  60%,
            var(--cc-launch-grad-to)   100%);
    display: flex;
    align-items: center;
    padding: 0 24px;
    overflow: hidden;
}

.cc-launch-droplets {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.14;
    mix-blend-mode: screen;
}

/* Lockup sits INSIDE the gradient on the left. The logo image is rendered
   on a soft white pill so the wordmark stays readable on the deep blue. */
.cc-launch-modal-lockup {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* The logo JPG already has a white background, so we don't add another pill,
   we just round the corners and let the natural canvas read as the lockup. */
.cc-launch-modal-logo {
    height: 56px;
    width: auto;
    max-width: 220px;
    border-radius: 10px;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.20);
    background: #FFFFFF;
    display: block;
}

/* The pill now sits to the RIGHT of the lockup, centered vertically. */
.cc-launch-modal-chip {
    position: relative;
    z-index: 2;
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.30);
    border-radius: 999px;
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.cc-launch-modal-chip-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4ADE80;
    box-shadow:
        0 0 0 3px rgba(74, 222, 128, 0.30),
        0 0 8px   rgba(74, 222, 128, 0.55);
}

.cc-launch-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.18);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 150ms ease;
    z-index: 3;
    font-size: 12px;
}
.cc-launch-modal-close:hover,
.cc-launch-modal-close:focus-visible {
    background: rgba(255, 255, 255, 0.30);
    outline: none;
}

.cc-launch-modal-body {
    padding: 24px 28px 18px;
}

.cc-launch-modal-headline {
    font-size: 22px;
    font-weight: 700;
    color: var(--cc-launch-ink);
    margin: 0 0 10px;
    letter-spacing: -0.015em;
    line-height: 1.2;
}

.cc-launch-modal-copy {
    color: var(--cc-launch-muted);
    font-size: 14px;
    line-height: 1.55;
    margin: 0 0 20px;
}

.cc-launch-chips {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* Chip layout: a small coloured icon tile on the left, bold label on the right.
   White card, soft border + subtle hover lift. Reads as a premium feature row. */
.cc-launch-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--cc-launch-ink);
    transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}

.cc-launch-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px -8px rgba(15, 23, 42, 0.20);
    border-color: #CBD5E1;
}

.cc-launch-chip-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--cc-chip-fill, #1976D2);
    color: #FFFFFF;
    flex-shrink: 0;
    font-size: 14px;
    line-height: 1;
    box-shadow: 0 3px 8px -2px var(--cc-chip-shadow, rgba(25, 118, 210, 0.45));
}

.cc-launch-chip--cyan  { --cc-chip-fill: var(--cc-chip-cyan);  --cc-chip-shadow: rgba(0, 188, 212, 0.45); }
.cc-launch-chip--blue  { --cc-chip-fill: var(--cc-chip-blue);  --cc-chip-shadow: rgba(25, 118, 210, 0.45); }
.cc-launch-chip--green { --cc-chip-fill: var(--cc-chip-green); --cc-chip-shadow: rgba(76, 175, 80, 0.45); }
.cc-launch-chip--amber { --cc-chip-fill: var(--cc-chip-amber); --cc-chip-shadow: rgba(255, 152, 0, 0.45); }

.cc-launch-chip-label {
    color: var(--cc-launch-ink);
    line-height: 1.25;
}

.cc-launch-modal-footer {
    background: var(--cc-launch-band);
    border-top: 1px solid var(--cc-launch-line);
    padding: 14px 28px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
}

/* The modal primary CTA reuses the app's standard --btn-primary-bg so the
   button matches every other primary button in the dealer chrome. */

/* =========================================================================
   LaunchBanner. Persistent strip above the dealer top header
   ========================================================================= */
.cc-launch-banner {
    /* Sticky to viewport top inside .main-content. The dealer sidebar is
       position:fixed at the side, so this banner stays glued to the top of
       the right-hand wrapper as the page scrolls. */
    position: sticky;
    top: 0;
    width: 100%;
    min-height: 88px;
    padding: 14px 24px;
    /* Layered background. Lighter, brighter blue/cyan family with a soft
       white sheen on the left and a brighter sky accent on the right.
       Sits clearly distinct from the deep-blue sidebar without going dark. */
    background:
        radial-gradient(55% 130% at 88% 50%, rgba(186, 230, 253, 0.30), transparent 60%),
        linear-gradient(95deg,
            #1E40AF 0%,
            #1E40AF 25%,
            #2563EB 50%,
            #0EA5E9 78%,
            #0284C7 100%);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    gap: 20px;
    overflow: hidden;
    z-index: 1040;
    box-shadow:
        inset 0 1px 0 0    rgba(255, 255, 255, 0.10),
        0     8px 22px -8px rgba(15, 23, 42, 0.45),
        0     1px 0      0 rgba(15, 23, 42, 0.14);
}

.cc-launch-banner-logo {
    height: 56px;
    width: auto;
    max-width: 140px;
    background: #FFFFFF;
    border-radius: 10px;
    padding: 6px 10px;
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.24);
}

/* Banner droplet decoration. Visible but not dominant. */
.cc-launch-banner .cc-launch-droplets {
    opacity: 0.45;
    mix-blend-mode: normal;
}

.cc-launch-banner-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
    gap: 4px;
    align-items: flex-start;
    line-height: 1.25;
}

.cc-launch-banner-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    flex-shrink: 0;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.cc-launch-banner-headline {
    font-weight: 800;
    font-size: 17px;
    letter-spacing: -0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.cc-launch-banner-body {
    font-weight: 400;
    font-size: 13.5px;
    opacity: 0.94;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.cc-launch-banner-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.cc-launch-banner-cta {
    background: #FFFFFF;
    color: var(--cc-launch-grad-to);
    border: none;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: filter 150ms ease, transform 150ms ease, box-shadow 150ms ease;
    box-shadow: 0 4px 10px -2px rgba(15, 23, 42, 0.22);
}
.cc-launch-banner-cta:hover,
.cc-launch-banner-cta:focus-visible {
    filter: brightness(0.98);
    color: var(--cc-launch-grad-to);
    transform: translateY(-1px);
    outline: none;
    box-shadow: 0 6px 14px -2px rgba(15, 23, 42, 0.30);
}

.cc-launch-banner-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: rgba(255, 255, 255, 0.16);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 150ms ease;
}
.cc-launch-banner-close:hover,
.cc-launch-banner-close:focus-visible {
    background: rgba(255, 255, 255, 0.30);
    outline: none;
}

@media (max-width: 720px) {
    .cc-launch-banner-pill,
    .cc-launch-banner-body { display: none; }
}

/* =========================================================================
   Bootstrap modal animation override. Matches the brief (300ms ease-out pop)
   ========================================================================= */
.modal.cc-launch-modal-shell .modal-dialog {
    transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1),
                opacity   250ms ease-out;
}
.modal.cc-launch-modal-shell.fade .modal-dialog {
    transform: translateY(8px) scale(0.98);
    opacity: 0;
}
.modal.cc-launch-modal-shell.show .modal-dialog {
    transform: translateY(0) scale(1);
    opacity: 1;
}
.modal.cc-launch-modal-shell .modal-backdrop {
    background-color: rgba(15, 23, 42, 0.55);
}

/* =========================================================================
   Status / Mode pills used in the superadmin Updates list
   ========================================================================= */
.cc-mode-pill--modal  { background-color: #EDE9FE !important; color: #6D28D9 !important; }
.cc-mode-pill--banner { background-color: #CFFAFE !important; color: #0E7490 !important; }

/* =========================================================================
   Live preview pane (form right column) and variant preview stage
   ========================================================================= */
.cc-preview-frame {
    background: #FFFFFF;
    border: 1px dashed #CBD5E1;
    border-radius: 12px;
    padding: 20px;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cc-preview-frame .cc-launch-modal-card {
    width: 100%;
    max-width: 480px;
    box-shadow: 0 12px 32px -10px rgba(15, 23, 42, 0.35);
}
.cc-preview-frame .cc-launch-banner {
    border-radius: 10px;
    width: 100%;
}

/* =========================================================================
   Print: launch artifacts never belong on a printed page (water test
   results, customer reports, inventory sheets). Hide everything launch
   so dealers don't get a "ClearCare 2.0 is live" header on their printouts.
   ========================================================================= */
@media print {
    .cc-launch-banner,
    .cc-launch-modal-shell,
    .cc-launch-modal-card,
    .modal-backdrop {
        display: none !important;
    }
}
