/* ============================================================================
 * DoctorConnect Interactive Guide — Engine Styles
 * Spotlight tour overlay + HUD. Namespaced under .dcg- / #dcg* to avoid
 * colliding with the app stylesheets the demo pages reuse.
 * ==========================================================================*/

/* --- Real navbar dropdown submenus (mirrors Interface2025 navbar.cfm) ----- */
.dropdown-submenu { position: relative; }
.dropdown-submenu .dropdown-menu { top: 0; left: 100%; margin-top: -1px; }
.dropdown-submenu:hover > .dropdown-menu { display: block; }
.dropdown-submenu .dropdown-toggle::after { transform: rotate(-90deg); position: absolute; right: 6px; top: 50%; margin-top: -3px; }
@media (max-width: 768px) {
    .dropdown-submenu .dropdown-menu { position: static; left: 0; float: none; width: auto; margin-top: 0; background-color: #f8f9fa; border: 0; box-shadow: none; }
}

/* --- Demo banner (top strip on every guide page) ------------------------- */
#dcgDemoBanner {
    background: linear-gradient(135deg, #6610f2, #0d6efd);
    color: #fff;
    text-align: center;
    font-size: 0.82rem;
    font-weight: 500;
    padding: 5px 12px;
    letter-spacing: 0.02em;
}
#dcgDemoBanner a { color: #fff; text-decoration: underline; font-weight: 600; }

/* --- Launch button (single-page mode, no active tour) -------------------- */
#dcgLaunch {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 20000;
    border: none;
    border-radius: 50px;
    padding: 12px 22px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #0d6efd, #6610f2);
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.45);
    cursor: pointer;
    display: none;            /* shown by JS only when appropriate */
    align-items: center;
    gap: 8px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
#dcgLaunch:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(13, 110, 253, 0.55); }
#dcgLaunch i { font-size: 1.1rem; }

/* --- Overlay + spotlight ------------------------------------------------- */
#dcgOverlay {
    position: fixed;
    inset: 0;
    z-index: 20001;
    display: none;
    pointer-events: none;
}
#dcgOverlay.active { display: block; }

#dcgSpotlight {
    position: absolute;
    border-radius: 10px;
    box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.74);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    outline: 3px solid #ffc107;
    outline-offset: 2px;
}

/* Transparent click-catcher so the page underneath isn't interactable mid-tour */
#dcgCatcher {
    position: fixed;
    inset: 0;
    z-index: 20001;
    display: none;
    pointer-events: auto;
    background: transparent;
}
#dcgCatcher.active { display: block; }

/* --- Popup card ---------------------------------------------------------- */
#dcgPopup {
    position: fixed;
    z-index: 20003;
    width: 360px;
    max-width: calc(100vw - 32px);
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    padding: 18px 20px 16px;
    pointer-events: auto;
    display: none;
    transition: top 0.35s cubic-bezier(0.4, 0, 0.2, 1), left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
#dcgPopup .dcg-eyebrow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6610f2;
    margin-bottom: 6px;
}
#dcgPopup .dcg-eyebrow .dcg-feature-tag {
    color: #64748b;
    font-weight: 600;
}
#dcgPopup h6 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 8px;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}
#dcgPopup .dcg-body {
    font-size: 0.9rem;
    line-height: 1.55;
    color: #475569;
    margin-bottom: 14px;
}
#dcgPopup .dcg-progress {
    height: 5px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 14px;
}
#dcgPopup .dcg-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #0d6efd, #6610f2);
    border-radius: 4px;
    transition: width 0.35s ease;
}
#dcgPopup .dcg-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
#dcgPopup .dcg-controls .dcg-right { display: flex; gap: 8px; }
#dcgPopup .dcg-skip {
    background: none; border: none; color: #94a3b8;
    font-size: 0.82rem; cursor: pointer; padding: 6px 4px;
}
#dcgPopup .dcg-skip:hover { color: #64748b; text-decoration: underline; }
#dcgPopup .btn { font-size: 0.85rem; }

/* Decision / branch step — choice buttons instead of Back/Next.
   Stacked full-width (primary on top) so longer, descriptive labels read cleanly. */
#dcgPopup .dcg-decision { flex-direction: column-reverse; gap: 8px; }
#dcgPopup .dcg-decision .btn { width: 100%; white-space: normal; padding: 9px 14px; }

/* --- Tour HUD (overall progress across features, top-right) -------------- */
#dcgHud {
    position: fixed;
    top: 64px;
    right: 18px;
    z-index: 20002;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.18);
    padding: 12px 14px;
    width: 230px;
    display: none;
    font-size: 0.8rem;
}
#dcgHud.active { display: block; }
/* Slide to the bottom-right when a highlighted element would sit behind it. */
#dcgHud { transition: top 0.3s ease, bottom 0.3s ease, opacity 0.2s ease; }
#dcgHud.dcg-hud-alt { top: auto; bottom: 18px; }
#dcgHud .dcg-hud-title {
    font-weight: 700; color: #1e293b; font-size: 0.82rem;
    display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px;
}
#dcgHud .dcg-hud-exit {
    background: none; border: none; color: #94a3b8; cursor: pointer; font-size: 0.95rem; line-height: 1; padding: 0;
}
#dcgHud .dcg-hud-exit:hover { color: #dc3545; }
#dcgHud ol { list-style: none; margin: 0; padding: 0; }
#dcgHud li {
    display: flex; align-items: center; gap: 8px;
    padding: 3px 0; color: #94a3b8;
}
#dcgHud li i.dcg-state { font-size: 0.9rem; }
#dcgHud li.done { color: #198754; }
#dcgHud li.current { color: #0d6efd; font-weight: 700; }
#dcgHud .dcg-hud-sub { color: #94a3b8; font-weight: 600; font-size: 0.72rem; }

/* --- Completion modal ---------------------------------------------------- */
#dcgDone {
    position: fixed; inset: 0; z-index: 20004; display: none;
    align-items: center; justify-content: center; background: rgba(15, 23, 42, 0.6);
}
#dcgDone.active { display: flex; }
#dcgDone .dcg-done-card {
    background: #fff; border-radius: 18px; padding: 36px 40px; text-align: center;
    max-width: 440px; box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
#dcgDone .dcg-done-card i.dcg-trophy { font-size: 3.2rem; color: #198754; }
#dcgDone .dcg-done-card h4 { font-weight: 700; margin: 14px 0 8px; }
#dcgDone .dcg-done-actions { display: flex; gap: 10px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
