/* ===== SchulPilot Onboarding Tour Styles ===== */

/* Overlay */
.tour-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 99999;
    pointer-events: all;
}

body.tour-active {
    overflow: hidden;
}

/* Backdrop */
.tour-backdrop {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
}

.tour-backdrop-highlight {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.3);
}

/* Highlight ring around target element */
.tour-highlight-ring {
    position: fixed;
    border-radius: 12px;
    box-shadow: 0 0 0 4px var(--c-primary, #7B4BDE), 0 0 0 8px rgba(123, 75, 222, 0.3);
    pointer-events: none;
    animation: tour-pulse 2s ease-in-out infinite;
    z-index: 100000;
}

.tour-highlight-cutout {
    position: fixed;
    border-radius: 12px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.35);
}

@keyframes tour-pulse {
    0%, 100% { box-shadow: 0 0 0 4px var(--c-primary, #7B4BDE), 0 0 0 8px rgba(123, 75, 222, 0.3); }
    50% { box-shadow: 0 0 0 4px var(--c-primary, #7B4BDE), 0 0 0 14px rgba(123, 75, 222, 0.1); }
}

/* Arrow pointing to target */
.tour-arrow {
    position: fixed;
    z-index: 100001;
    width: 0; height: 0;
    pointer-events: none;
}

.tour-arrow-top {
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 12px solid white;
    transform: translateX(-10px);
}

.tour-arrow-bottom {
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 12px solid white;
    transform: translateX(-10px);
}

/* Tour Card (tooltip / fullscreen) */
.tour-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3), 0 4px 16px rgba(0,0,0,0.1);
    z-index: 100002;
    animation: tour-card-enter 0.3s ease-out;
}

.tour-card-fullscreen {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 380px;
    width: calc(100vw - 32px);
    max-height: calc(100vh - 80px);
    overflow-y: auto;
}

@keyframes tour-card-enter {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.tour-tooltip-bottom,
.tour-tooltip-top,
.tour-tooltip-center {
    animation: tour-tooltip-enter 0.3s ease-out;
}

@keyframes tour-tooltip-enter {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Card Icon */
.tour-card-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--c-primary, #7B4BDE), #9B6BFE);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.tour-card-icon i {
    font-size: 1.75rem;
    color: white;
}

/* Card Title */
.tour-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 0.75rem;
    text-align: center;
}

/* Card Text */
.tour-card-text {
    font-size: 0.95rem;
    color: #4a4a6a;
    line-height: 1.5;
    margin: 0 0 1rem;
    text-align: center;
}

.tour-card-text strong {
    color: var(--c-primary, #7B4BDE);
}

/* Card Footer */
.tour-card-footer {
    margin-top: 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

/* Progress Dots */
.tour-progress {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.tour-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ddd;
    transition: all 0.3s ease;
}

.tour-dot.active {
    background: var(--c-primary, #7B4BDE);
    transform: scale(1.3);
}

.tour-dot.done {
    background: var(--c-primary, #7B4BDE);
    opacity: 0.5;
}

/* Buttons */
.tour-buttons {
    display: flex;
    gap: 0.75rem;
    width: 100%;
    justify-content: center;
}

.tour-btn-next {
    background: linear-gradient(135deg, var(--c-primary, #7B4BDE), #9B6BFE);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    flex: 1;
    max-width: 220px;
}

.tour-btn-next:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(123, 75, 222, 0.4);
}

.tour-btn-next:active {
    transform: translateY(0);
}

.tour-btn-skip {
    background: none;
    border: none;
    color: #999;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    transition: color 0.2s;
}

.tour-btn-skip:hover {
    color: #666;
}

/* ===== Custom Content Styles ===== */

/* Weight Example */
.tour-weight-example {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1rem 0;
    padding: 1rem;
    background: #f8f7ff;
    border-radius: 12px;
}

.tour-weight-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.tour-weight-badge {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: white;
    flex-shrink: 0;
}

.tour-weight-badge.high { background: #e74c3c; }
.tour-weight-badge.normal { background: #3498db; }
.tour-weight-badge.low { background: #95a5a6; }

.tour-weight-item span {
    font-size: 0.9rem;
    color: #4a4a6a;
}

/* Icon Legend */
.tour-icon-legend {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin: 1rem 0;
    padding: 1rem;
    background: #f8f7ff;
    border-radius: 12px;
}

.tour-legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tour-legend-item i {
    color: var(--c-primary, #7B4BDE);
    width: 20px;
    text-align: center;
}

.tour-legend-item span {
    font-size: 0.85rem;
    color: #4a4a6a;
}

/* Hint text */
.tour-hint {
    font-size: 0.85rem;
    color: #888;
    margin-top: 0.75rem;
    text-align: center;
}

.tour-hint i {
    color: var(--c-primary, #7B4BDE);
    margin-right: 0.3rem;
}

/* Feature List */
.tour-feature-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.tour-feature-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9rem;
    color: #4a4a6a;
}

.tour-feature-list li:last-child {
    border-bottom: none;
}

.tour-feature-list li i {
    color: var(--c-primary, #7B4BDE);
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

/* Steps List */
.tour-steps-list {
    padding-left: 1.5rem;
    margin: 1rem 0;
}

.tour-steps-list li {
    padding: 0.5rem 0;
    font-size: 0.9rem;
    color: #4a4a6a;
    line-height: 1.4;
}

.tour-steps-list li strong {
    color: var(--c-primary, #7B4BDE);
}

/* AI Features Grid */
.tour-ai-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin: 1rem 0;
    padding: 1rem;
    background: #f8f7ff;
    border-radius: 12px;
}

.tour-ai-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tour-ai-item i {
    color: var(--c-primary, #7B4BDE);
    font-size: 1.1rem;
}

.tour-ai-item span {
    font-size: 0.8rem;
    color: #4a4a6a;
}

/* Premium Feature Box */
.tour-premium-feature {
    text-align: left;
}

.tour-premium-feature p {
    font-size: 0.95rem;
    color: #4a4a6a;
    line-height: 1.5;
    margin: 0 0 0.5rem;
}

/* Closing Content */
.tour-closing-content {
    text-align: left;
}

.tour-closing-content > p:first-child {
    text-align: center;
    margin-bottom: 1rem;
}

.tour-closing-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1rem 0;
}

.tour-closing-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f8f7ff;
    border-radius: 10px;
}

.tour-closing-item > i {
    color: var(--c-primary, #7B4BDE);
    font-size: 1.25rem;
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.tour-closing-item strong {
    display: block;
    color: #1a1a2e;
    font-size: 0.9rem;
    margin-bottom: 0.15rem;
}

.tour-closing-item p {
    font-size: 0.8rem;
    color: #888;
    margin: 0;
}

.tour-closing-thanks {
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    color: var(--c-primary, #7B4BDE);
    margin-top: 1rem;
}

/* Premium Thanks */
.tour-premium-thanks {
    text-align: center;
}

.tour-thanks-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    animation: tour-heartbeat 1.5s ease-in-out infinite;
}

.tour-thanks-icon i {
    font-size: 2rem;
    color: white;
}

@keyframes tour-heartbeat {
    0%, 100% { transform: scale(1); }
    15% { transform: scale(1.15); }
    30% { transform: scale(1); }
    45% { transform: scale(1.1); }
    60% { transform: scale(1); }
}

.tour-thanks-main {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 0.75rem;
}

.tour-thanks-detail {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
}

.tour-thanks-heart {
    font-size: 1.25rem;
    color: var(--c-primary, #7B4BDE);
    margin: 1rem 0;
}

.tour-thanks-small {
    font-size: 0.8rem;
    color: #999;
    font-style: italic;
}

/* Dark Mode Support */
[data-theme="dark"] .tour-card {
    background: #2a2a3e;
}

[data-theme="dark"] .tour-card-title {
    color: #f0f0f0;
}

[data-theme="dark"] .tour-card-text {
    color: #b0b0c0;
}

[data-theme="dark"] .tour-weight-example,
[data-theme="dark"] .tour-icon-legend,
[data-theme="dark"] .tour-ai-features,
[data-theme="dark"] .tour-closing-item {
    background: #1a1a2e;
}

[data-theme="dark"] .tour-feature-list li {
    border-bottom-color: #3a3a4e;
    color: #b0b0c0;
}

[data-theme="dark"] .tour-weight-item span,
[data-theme="dark"] .tour-legend-item span,
[data-theme="dark"] .tour-ai-item span,
[data-theme="dark"] .tour-premium-feature p,
[data-theme="dark"] .tour-steps-list li {
    color: #b0b0c0;
}

[data-theme="dark"] .tour-closing-item strong {
    color: #f0f0f0;
}

[data-theme="dark"] .tour-thanks-main {
    color: #f0f0f0;
}

[data-theme="dark"] .tour-thanks-detail {
    color: #999;
}
