/* ============================================================
   tour.css — Guided Tour Styles (intro.js customization)
   ============================================================ */

/* --- Tour trigger button in header (inherits .header-btn base styles) --- */
.header-btn.tour-guide-btn svg {
    stroke: var(--primary-color, #2196F3);
    width: 15px;
    height: 15px;
}
body.dark-mode .header-btn.tour-guide-btn svg {
    stroke: #60a5fa;
}

/* --- intro.js tooltip overrides --- */
.introjs-tooltip {
    max-width: 340px;
    border-radius: 12px;
    font-family: inherit;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.introjs-tooltip-title {
    font-size: 14px;
    font-weight: 600;
    color: #6366f1;
}

.introjs-tooltiptext {
    font-size: 13px;
    line-height: 1.6;
    color: #374151;
}
/* === Dark Mode Overrides === */
body.dark-mode .introjs-tooltip {
    background: #1e2433;
    border: 1px solid #374151;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    color: #e5e7eb;
}

body.dark-mode .introjs-tooltip-header {
    background: #1e2433;
    border-bottom: 1px solid #374151;
}

body.dark-mode .introjs-tooltip-title {
    color: #818cf8;
}

body.dark-mode .introjs-tooltiptext {
    color: #d1d5db;
}

body.dark-mode .introjs-tooltipbuttons {
    background: #1e2433;
    border-top: 1px solid #374151;
}

body.dark-mode .introjs-prevbutton {
    background: transparent !important;
    border-color: #4b5563 !important;
    color: #9ca3af !important;
}
body.dark-mode .introjs-prevbutton:hover {
    background: #374151 !important;
    color: #e5e7eb !important;
}

body.dark-mode .introjs-skipbutton {
    color: #6b7280 !important;
}
body.dark-mode .introjs-skipbutton:hover {
    color: #9ca3af !important;
}

body.dark-mode .introjs-arrow.top:after,
body.dark-mode .introjs-arrow.top-right:after,
body.dark-mode .introjs-arrow.top-middle:after {
    border-bottom-color: #1e2433;
}
body.dark-mode .introjs-arrow.bottom:after,
body.dark-mode .introjs-arrow.bottom-right:after,
body.dark-mode .introjs-arrow.bottom-middle:after {
    border-top-color: #1e2433;
}
body.dark-mode .introjs-arrow.left:after,
body.dark-mode .introjs-arrow.left-bottom:after {
    border-right-color: #1e2433;
}
body.dark-mode .introjs-arrow.right:after,
body.dark-mode .introjs-arrow.right-bottom:after {
    border-left-color: #1e2433;
}

body.dark-mode .introjs-progress {
    background: #374151;
}

body.dark-mode .introjs-bullets ul li a {
    background: #4b5563;
}
body.dark-mode .introjs-bullets ul li a.active,
body.dark-mode .introjs-bullets ul li a:hover {
    background: #818cf8 !important;
}

.introjs-tooltiptext ul {
    margin: 6px 0 0 0;
    padding-left: 18px;
}
.introjs-tooltiptext li {
    margin-bottom: 3px;
}

/* --- Buttons --- */
.introjs-button {
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    padding: 5px 12px;
    text-shadow: none;
    cursor: pointer;
}

.introjs-nextbutton,
.introjs-donebutton {
    background: #6366f1 !important;
    border-color: #6366f1 !important;
    color: #fff !important;
}
.introjs-nextbutton:hover,
.introjs-donebutton:hover {
    background: #4f46e5 !important;
    border-color: #4f46e5 !important;
}

.introjs-prevbutton {
    background: transparent !important;
    border-color: #d1d5db !important;
    color: #6b7280 !important;
}
.introjs-prevbutton:hover {
    background: #f3f4f6 !important;
}

.introjs-skipbutton {
    font-size: 18px !important;
    color: #9ca3af !important;
}
.introjs-skipbutton:hover {
    color: #6b7280 !important;
}

/* --- Highlight overlay --- */
.introjs-helperLayer {
    border-radius: 8px;
    box-shadow:
        rgba(33, 33, 33, 0.5) 0 0 1px 2px,
        rgba(33, 33, 33, 0.5) 0 0 0 5000px !important;
}

/* --- Progress bar --- */
.introjs-progressbar {
    background: #6366f1 !important;
}
.introjs-progress {
    background: #e5e7eb;
    border-radius: 4px;
}

/* --- Bullets --- */
.introjs-bullets ul li a.active {
    background: #6366f1 !important;
}

/* ============================================================
   First-load Tour button highlight (pulse ring + tooltip)
   Triggered by js/tour.js on first visit per browser.
   ============================================================ */

/* The button itself stays static; we use a pseudo-element ring */
.header-btn.tour-guide-btn.tour-highlight-active {
    position: relative;
    z-index: 5;
}

.header-btn.tour-guide-btn.tour-highlight-active::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 10px;
    border: 2px solid #6366f1;
    pointer-events: none;
    animation: tourHighlightPulse 1.5s ease-out 3;
    opacity: 0;
}

@keyframes tourHighlightPulse {
    0%   { transform: scale(0.95); opacity: 0.85;
           box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.55); }
    70%  { transform: scale(1.18); opacity: 0;
           box-shadow: 0 0 0 12px rgba(99, 102, 241, 0); }
    100% { transform: scale(1.18); opacity: 0;
           box-shadow: 0 0 0 12px rgba(99, 102, 241, 0); }
}

/* Floating tooltip pointing down at the Tour button */
.tour-highlight-tooltip {
    position: fixed;
    z-index: 9999;
    background: #2563eb;
    color: #fff;
    padding: 10px 14px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.35s ease, transform 0.35s ease;
    pointer-events: auto;
    white-space: nowrap;
}

.tour-highlight-tooltip.show {
    opacity: 1;
    transform: translateY(0);
}

.tour-highlight-tooltip::after {
    content: '';
    position: absolute;
    top: -6px;
    right: 28px;
    width: 12px;
    height: 12px;
    background: #2563eb;
    transform: rotate(45deg);
    border-radius: 2px;
}

.tour-highlight-tooltip .tour-tooltip-close {
    background: transparent;
    border: 0;
    color: #d1d5db;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0 2px;
    margin-left: 2px;
}
.tour-highlight-tooltip .tour-tooltip-close:hover {
    color: #fff;
}

body.dark-mode .tour-highlight-tooltip,
body.dark-mode .tour-highlight-tooltip::after {
    background: #3b82f6;
}
