/* ========================================
   Guided Tour Styles
   ======================================== */

/* Overlay backdrop - subtle darkening, not obstructive */
.guided-tour-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.15);
    z-index: 9998;
    pointer-events: none;
}

/* Highlighted element */
.guided-tour-highlight {
    position: relative;
    z-index: 9999 !important;
    box-shadow: 0 0 0 4px #3b82f6,
                0 0 0 8px rgba(59, 130, 246, 0.3),
                0 0 30px rgba(59, 130, 246, 0.5) !important;
    border-radius: 4px;
    animation: guided-tour-pulse 2s ease-in-out infinite;
}

@keyframes guided-tour-pulse {
    0%, 100% {
        box-shadow: 0 0 0 4px #3b82f6,
                    0 0 0 8px rgba(59, 130, 246, 0.3),
                    0 0 30px rgba(59, 130, 246, 0.5);
    }
    50% {
        box-shadow: 0 0 0 4px #3b82f6,
                    0 0 0 12px rgba(59, 130, 246, 0.2),
                    0 0 40px rgba(59, 130, 246, 0.4);
    }
}

/* Tour header bar */
.guided-tour-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}

.guided-tour-header .tour-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
}

.guided-tour-header .tour-badge .icon {
    font-size: 1.25rem;
}

.guided-tour-header .tour-controls {
    display: flex;
    gap: 0.5rem;
}

.guided-tour-header .tour-controls button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: all 0.2s;
}

.guided-tour-header .tour-controls button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.guided-tour-header .tour-controls button.active {
    background: #3b82f6;
    border-color: #3b82f6;
}

/* Tour content area - positioned bottom-right, out of the way */
.guided-tour-content {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

/* Info panel - compact, positioned to not obstruct */
.guided-tour-panel {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.05);
    max-width: 380px;
    width: 380px;
    overflow: hidden;
    pointer-events: auto;
    animation: guided-tour-panel-enter 0.3s ease-out;
}

@keyframes guided-tour-panel-enter {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.guided-tour-panel-header {
    padding: 1.25rem;
    border-bottom: 1px solid #e5e7eb;
}

.guided-tour-panel-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 0.25rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.guided-tour-panel-status {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
}

.guided-tour-panel-status.available {
    background: #d1fae5;
    color: #065f46;
}

.guided-tour-panel-status.coming-soon {
    background: #fef3c7;
    color: #92400e;
}

.guided-tour-panel-body {
    padding: 1.25rem;
}

.guided-tour-panel-description {
    color: #4b5563;
    line-height: 1.6;
    margin: 0;
    font-size: 0.9375rem;
}

.guided-tour-panel-action-hint {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #f0f9ff;
    border-radius: 8px;
    color: #0369a1;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Tour footer with navigation */
.guided-tour-footer {
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.guided-tour-footer .nav-btn {
    background: #1e3a5f;
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.8125rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.guided-tour-footer .nav-btn:hover:not(:disabled) {
    background: #2563eb;
}

.guided-tour-footer .nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.guided-tour-footer .nav-btn.primary {
    background: #3b82f6;
}

.guided-tour-footer .nav-btn.primary:hover:not(:disabled) {
    background: #2563eb;
}

/* Progress indicator */
.guided-tour-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    flex: 1;
    max-width: 120px;
}

.guided-tour-progress-bar {
    width: 100%;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
}

.guided-tour-progress-fill {
    height: 100%;
    background: #3b82f6;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.guided-tour-progress-text {
    color: #6b7280;
    font-size: 0.6875rem;
}

/* Tour selector modal */
.guided-tour-selector-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.guided-tour-selector {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.guided-tour-selector-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.guided-tour-selector-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
}

.guided-tour-selector-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
    padding: 0.25rem;
    line-height: 1;
}

.guided-tour-selector-close:hover {
    color: #111827;
}

.guided-tour-selector-body {
    padding: 1rem;
    overflow-y: auto;
    max-height: calc(80vh - 80px);
}

.guided-tour-category {
    margin-bottom: 1.5rem;
}

.guided-tour-category:last-child {
    margin-bottom: 0;
}

.guided-tour-category-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    margin-bottom: 0.5rem;
    padding: 0 0.5rem;
}

.guided-tour-item {
    display: flex;
    align-items: center;
    padding: 0.875rem 1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s;
    border: 1px solid transparent;
}

.guided-tour-item:hover {
    background: #f0f9ff;
    border-color: #bfdbfe;
}

.guided-tour-item-icon {
    font-size: 1.5rem;
    margin-right: 0.875rem;
}

.guided-tour-item-content {
    flex: 1;
}

.guided-tour-item-name {
    font-weight: 500;
    color: #111827;
    margin-bottom: 0.125rem;
}

.guided-tour-item-description {
    font-size: 0.8125rem;
    color: #6b7280;
}

.guided-tour-item-duration {
    font-size: 0.75rem;
    color: #9ca3af;
    white-space: nowrap;
}

/* Tour launcher button */
.guided-tour-launcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.guided-tour-launcher:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.4);
}

.guided-tour-launcher .icon {
    font-size: 1rem;
}

/* Tour header bar - integrated into the panel */
.guided-tour-header {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.guided-tour-header .tour-controls button {
    padding: 0.375rem 0.5rem;
    font-size: 0.75rem;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .guided-tour-content {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
    }

    .guided-tour-panel {
        max-width: 100%;
        width: auto;
    }

    .guided-tour-selector {
        max-width: calc(100% - 2rem);
        margin: 1rem;
    }

    .guided-tour-progress-bar {
        width: 120px;
    }
}
