/* ============================================================
   Onboarding Tour - CSS
   ============================================================ */

/* Overlay */
.onboarding-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99990;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.onboarding-overlay.active {
    pointer-events: auto;
}

/* Dark backdrop pieces (4 rectangles around the highlight) */
.onboarding-backdrop {
    position: fixed;
    background: rgba(0, 0, 0, 0.55);
    z-index: 99991;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
}

/* Highlight cutout border glow */
.onboarding-highlight {
    position: fixed;
    z-index: 99992;
    border-radius: 8px;
    box-shadow: 0 0 0 4px rgba(41, 128, 185, 0.5),
                0 0 20px rgba(41, 128, 185, 0.25);
    pointer-events: none;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Tooltip / Dialog */
.onboarding-tooltip {
    position: fixed;
    z-index: 99995;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18),
                0 2px 8px rgba(0, 0, 0, 0.08);
    width: 420px;
    max-width: calc(100vw - 32px);
    font-family: 'Roboto', 'Inter', sans-serif;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: auto;
}

.onboarding-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Center dialog variant */
.onboarding-tooltip.center-dialog {
    position: fixed;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) scale(0.95);
    width: 480px;
}

.onboarding-tooltip.center-dialog.visible {
    transform: translate(-50%, -50%) scale(1);
}

/* Arrow */
.onboarding-arrow {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #fff;
    transform: rotate(45deg);
    box-shadow: -2px -2px 4px rgba(0, 0, 0, 0.06);
    z-index: -1;
}

.onboarding-arrow.arrow-top {
    top: -5px;
    left: 32px;
}

.onboarding-arrow.arrow-bottom {
    bottom: -5px;
    left: 32px;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.06);
}

.onboarding-arrow.arrow-left {
    left: -5px;
    transform: rotate(45deg);
    box-shadow: -2px 2px 4px rgba(0, 0, 0, 0.06);
}

.onboarding-arrow.arrow-right {
    right: -5px;
    transform: rotate(45deg);
    box-shadow: 2px -2px 4px rgba(0, 0, 0, 0.06);
}

/* Header */
.onboarding-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 20px 20px 0 20px;
}

.onboarding-title {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.4;
    flex: 1;
    padding-right: 12px;
}

.onboarding-close {
    width: 28px;
    height: 28px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s;
    color: #666;
    font-size: 16px;
    line-height: 1;
}

.onboarding-close:hover {
    background: #e8e8e8;
    color: #333;
}

/* Body content */
.onboarding-body {
    padding: 12px 20px 16px 20px;
    font-size: 14px;
    color: #444;
    line-height: 1.65;
}

.onboarding-body p {
    margin: 0 0 8px 0;
}

.onboarding-body p:last-child {
    margin-bottom: 0;
}

.onboarding-body ul {
    margin: 8px 0;
    padding-left: 20px;
}

.onboarding-body ul li {
    margin-bottom: 4px;
    line-height: 1.6;
}

/* Footer */
.onboarding-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px 16px 20px;
    border-top: 1px solid #f0f0f0;
}

.onboarding-step-counter {
    font-size: 13px;
    color: #999;
    font-weight: 400;
}

.onboarding-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.onboarding-btn {
    padding: 7px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-family: 'Roboto', 'Inter', sans-serif;
}

.onboarding-btn-secondary {
    background: #fff;
    color: #555;
    border: 1px solid #d9d9d9;
}

.onboarding-btn-secondary:hover {
    background: #fafafa;
    border-color: #bbb;
}

.onboarding-btn-primary {
    background: #2980B9;
    color: #fff;
    border: 1px solid #2980B9;
}

.onboarding-btn-primary:hover {
    background: #2471a3;
    border-color: #2471a3;
}

/* Welcome & Finish center dialog styling */
.onboarding-welcome-icon {
    text-align: center;
    padding: 24px 20px 0 20px;
}

.onboarding-welcome-icon svg {
    width: 64px;
    height: 64px;
}

.onboarding-tooltip.center-dialog .onboarding-header {
    padding: 20px 20px 0 20px;
}

.onboarding-tooltip.center-dialog .onboarding-footer {
    justify-content: space-between;
}

/* Full-screen overlay for center dialogs */
.onboarding-fulloverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    z-index: 99993;
    transition: opacity 0.3s ease;
}

/* Pulse animation on highlighted element */
@keyframes onboarding-pulse {
    0% { box-shadow: 0 0 0 4px rgba(41, 128, 185, 0.5), 0 0 20px rgba(41, 128, 185, 0.25); }
    50% { box-shadow: 0 0 0 8px rgba(41, 128, 185, 0.3), 0 0 30px rgba(41, 128, 185, 0.15); }
    100% { box-shadow: 0 0 0 4px rgba(41, 128, 185, 0.5), 0 0 20px rgba(41, 128, 185, 0.25); }
}

.onboarding-highlight.pulse {
    animation: onboarding-pulse 2s ease-in-out infinite;
}

/* Skip link */
.onboarding-skip {
    font-size: 12px;
    color: #999;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.2s;
}

.onboarding-skip:hover {
    color: #666;
}
