/**
 * Stylesheet for the custom step-by-step tour engine.
 * Premium design using modern colors, smooth transitions, and glassmorphism.
 */

/* Tour overlay */
.compras-tour-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.75); /* Slate 900 with opacity */
    backdrop-filter: blur(4px);
    z-index: 1040;
    transition: opacity 0.3s ease;
    pointer-events: auto;
}

/* Active highlighted element */
.compras-tour-highlighted {
    position: relative !important;
    z-index: 1045 !important;
    box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.9), 0 20px 25px -5px rgba(0, 0, 0, 0.3) !important;
    background-color: var(--bs-body-bg, #fff) !important;
    border-radius: 4px;
    pointer-events: none !important; /* Prevent clicks on highlighted element during tour */
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

/* Tour Card/Tooltip */
.compras-tour-card {
    position: absolute;
    width: 320px;
    max-width: 90vw;
    background: rgba(255, 255, 255, 0.95);
    color: #1e293b;
    border-radius: 12px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
    z-index: 1050;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.25s ease, transform 0.25s ease, top 0.25s ease, left 0.25s ease;
}

/* Dark mode overrides for tour card */
[data-bs-theme="dark"] .compras-tour-card {
    background: rgba(30, 41, 59, 0.95);
    color: #f1f5f9;
    border-color: rgba(71, 85, 105, 0.8);
}

.compras-tour-card.show {
    opacity: 1;
    transform: scale(1);
}

.compras-tour-header {
    padding: 16px 16px 8px 16px;
    font-weight: 700;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

[data-bs-theme="dark"] .compras-tour-header {
    border-bottom-color: rgba(71, 85, 105, 0.5);
}

.compras-tour-title {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.4;
}

.compras-tour-body {
    padding: 16px;
    font-size: 0.925rem;
    line-height: 1.6;
}

.compras-tour-footer {
    padding: 12px 16px;
    background-color: rgba(248, 250, 252, 0.8);
    border-top: 1px solid rgba(226, 232, 240, 0.5);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

[data-bs-theme="dark"] .compras-tour-footer {
    background-color: rgba(15, 23, 42, 0.4);
    border-top-color: rgba(71, 85, 105, 0.5);
}

.compras-tour-steps {
    font-size: 0.8rem;
    font-weight: 500;
    color: #64748b;
}

[data-bs-theme="dark"] .compras-tour-steps {
    color: #94a3b8;
}

.compras-tour-buttons {
    display: flex;
    gap: 8px;
}

.compras-tour-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.compras-tour-btn-skip {
    background: transparent;
    color: #64748b;
}

.compras-tour-btn-skip:hover {
    color: #0f172a;
}

[data-bs-theme="dark"] .compras-tour-btn-skip {
    color: #94a3b8;
}

[data-bs-theme="dark"] .compras-tour-btn-skip:hover {
    color: #f1f5f9;
}

.compras-tour-btn-prev {
    background: #e2e8f0;
    color: #334155;
}

.compras-tour-btn-prev:hover {
    background: #cbd5e1;
}

[data-bs-theme="dark"] .compras-tour-btn-prev {
    background: #334155;
    color: #f1f5f9;
}

[data-bs-theme="dark"] .compras-tour-btn-prev:hover {
    background: #475569;
}

.compras-tour-btn-next {
    background: #0f172a;
    color: #fff;
}

.compras-tour-btn-next:hover {
    background: #1e293b;
}

[data-bs-theme="dark"] .compras-tour-btn-next {
    background: #38bdf8; /* sky 400 */
    color: #0f172a;
}

[data-bs-theme="dark"] .compras-tour-btn-next:hover {
    background: #7dd3fc;
}
