/**
 * GreenDate Tour System - Professional Styling
 * Interactive product tour with tooltips and highlights
 */

/* ============================================
   TOUR OVERLAY
   ============================================ */

.tour-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.tour-overlay-highlight {
    background: transparent;
    box-shadow:
        0 0 0 4px rgba(255, 107, 53, 0.3),
        0 0 0 9999px rgba(0, 0, 0, 0.6);
    pointer-events: none;
}

/* ============================================
   TOUR TOOLTIP
   ============================================ */

.tour-tooltip {
    position: fixed;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    max-width: 400px;
    min-width: 320px;
    display: none;
    animation: tooltipFadeIn 0.3s ease-out;
}

.tour-tooltip-center {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 500px;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Tooltip Arrow */
.tour-tooltip::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
}

.tour-tooltip-top::before {
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 10px 10px 0 10px;
    border-color: white transparent transparent transparent;
}

.tour-tooltip-bottom::before {
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 10px 10px 10px;
    border-color: transparent transparent white transparent;
}

.tour-tooltip-left::before {
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 10px 0 10px 10px;
    border-color: transparent transparent transparent white;
}

.tour-tooltip-right::before {
    left: -10px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 10px 10px 10px 0;
    border-color: transparent white transparent transparent;
}

/* ============================================
   TOOLTIP HEADER
   ============================================ */

.tour-tooltip-header {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    padding: 18px 24px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tour-tooltip-header h3 {
    color: white;
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.tour-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
    padding: 0;
}

.tour-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* ============================================
   TOOLTIP CONTENT
   ============================================ */

.tour-tooltip-content {
    padding: 24px;
    background: white;
}

.tour-tooltip-content p {
    margin: 0;
    color: #374151;
    font-size: 15px;
    line-height: 1.6;
}

/* ============================================
   TOOLTIP FOOTER
   ============================================ */

.tour-tooltip-footer {
    padding: 16px 24px;
    background: linear-gradient(to bottom, #f9fafb 0%, #f3f4f6 100%);
    border-radius: 0 0 12px 12px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.tour-progress {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

.tour-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* ============================================
   TOUR BUTTONS
   ============================================ */

.tour-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tour-btn-primary {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.tour-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

.tour-btn-primary:active {
    transform: translateY(0);
}

.tour-btn-secondary {
    background: white;
    color: #6b7280;
    border: 2px solid #d1d5db;
}

.tour-btn-secondary:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #374151;
}

/* ============================================
   ELEMENT HIGHLIGHT
   ============================================ */

.tour-highlight {
    position: relative;
    z-index: 9999 !important;
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.4) !important;
    border-radius: 8px !important;
    animation: tourPulse 2s ease-in-out infinite;
}

@keyframes tourPulse {
    0%, 100% {
        box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(255, 107, 53, 0.2);
    }
}

/* ============================================
   COMPLETION MODAL
   ============================================ */

.tour-completion-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.tour-completion-modal {
    background: white;
    border-radius: 16px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.tour-completion-icon {
    font-size: 64px;
    margin-bottom: 20px;
    animation: bounce 0.6s ease-out;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.tour-completion-modal h2 {
    color: #ff6b35;
    margin: 0 0 16px 0;
    font-size: 28px;
}

.tour-completion-modal > p {
    color: #6b7280;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 24px;
}

.tour-completion-checklist {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-left: 4px solid #22c55e;
    padding: 20px;
    border-radius: 8px;
    text-align: left;
    margin-bottom: 24px;
}

.tour-completion-checklist h4 {
    color: #166534;
    margin: 0 0 12px 0;
    font-size: 16px;
}

.tour-completion-checklist ul {
    margin: 0;
    padding-left: 20px;
    color: #166534;
}

.tour-completion-checklist li {
    margin: 6px 0;
    font-size: 14px;
}

.tour-completion-btn {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
    transition: all 0.2s ease;
}

.tour-completion-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.4);
}

.tour-completion-btn:active {
    transform: translateY(0);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .tour-tooltip {
        max-width: 90vw;
        min-width: 280px;
    }

    .tour-tooltip-center {
        max-width: 90vw;
    }

    .tour-tooltip-header {
        padding: 16px 20px;
    }

    .tour-tooltip-header h3 {
        font-size: 16px;
    }

    .tour-tooltip-content {
        padding: 20px;
    }

    .tour-tooltip-content p {
        font-size: 14px;
    }

    .tour-tooltip-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .tour-progress {
        text-align: center;
    }

    .tour-buttons {
        width: 100%;
        justify-content: space-between;
    }

    .tour-btn {
        flex: 1;
        padding: 10px 16px;
        font-size: 13px;
    }

    .tour-completion-modal {
        padding: 30px 24px;
    }

    .tour-completion-icon {
        font-size: 48px;
    }

    .tour-completion-modal h2 {
        font-size: 24px;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

.tour-btn:focus,
.tour-close:focus {
    outline: 2px solid rgba(59, 130, 246, 0.5);
    outline-offset: 2px;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .tour-tooltip,
    .tour-completion-overlay,
    .tour-completion-modal,
    .tour-highlight {
        animation: none !important;
    }

    .tour-btn,
    .tour-close {
        transition: none !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .tour-tooltip {
        border: 2px solid #000;
    }

    .tour-overlay {
        background: rgba(0, 0, 0, 0.8);
    }
}

/* ============================================
   START TUTORIAL BUTTON (Dashboard)
   ============================================ */

.tutorial-btn {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 25px !important;
    padding: 10px 24px !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3) !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.tutorial-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.4) !important;
}

.tutorial-btn:active {
    transform: translateY(0) !important;
}

.tutorial-btn i {
    font-size: 16px !important;
}
