﻿/* ==================== ツアー機能専用スタイル ==================== */

/* オーバーレイ（クリック検知のみ。暗転はしない） */
#tourOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: transparent; /* 全体の暗転は行わない */
    z-index: 9998;
    pointer-events: none;
    display: none;
}

#tourOverlay.active {
    display: block;
    pointer-events: auto;
}

/* スポットライト効果（対象要素を明るく表示） */
.tour-spotlight {
    position: absolute;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.75);
    border-radius: 8px;
    z-index: 9999;
    pointer-events: none;
    transition: all 0.3s ease;
}

/* 吹き出し */
#tourTooltip {
    position: fixed; /* ビューポート基準で配置し、スクロールによるずれを防ぐ */
    background: white;
    border-radius: 12px;
    padding: 20px;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#tourTooltip.active {
    opacity: 1;
    transform: scale(1);
}

/* 吹き出しの矢印 */
#tourTooltip::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border: 10px solid transparent;
}

/* 矢印の位置バリエーション */
#tourTooltip.arrow-top::before {
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    border-bottom-color: white;
}

#tourTooltip.arrow-bottom::before {
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    border-top-color: white;
}

#tourTooltip.arrow-left::before {
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    border-right-color: white;
}

#tourTooltip.arrow-right::before {
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    border-left-color: white;
}

/* 吹き出し内のコンテンツ */
.tour-tooltip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.tour-tooltip-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary, #3f8efc);
    margin: 0;
}

.tour-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--muted, #6b7280);
    cursor: pointer;
    padding: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

.tour-close-btn:hover {
    background: var(--primary-soft, #e9f4ff);
}

.tour-tooltip-description {
    color: var(--fg, #1f2937);
    line-height: 1.6;
    margin: 0 0 16px;
}

.tour-tooltip-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.tour-step-indicator {
    font-size: 0.9rem;
    color: var(--muted, #6b7280);
}

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

.tour-btn {
    appearance: none;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.tour-btn-primary {
    background: var(--primary, #3f8efc);
    color: white;
}

.tour-btn-primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.tour-btn-secondary {
    background: var(--primary-soft, #e9f4ff);
    color: #2563eb;
}

.tour-btn-secondary:hover {
    background: #d1e7fd;
}

.tour-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    #tourTooltip {
        max-width: 90vw;
        padding: 16px;
    }
    
    .tour-tooltip-title {
        font-size: 1.1rem;
    }
    
    .tour-tooltip-description {
        font-size: 0.95rem;
    }
    
    .tour-btn {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
}
