﻿/* tour.css - Express tour styles */

/* ==================== EXPRESS TOUR STYLES ==================== */

/* Express Tour Button in Hub360 Menu */
.express-tour-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
    gap: 12px;
}

.express-tour-item:hover {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
}

.express-tour-item i {
    font-size: 18px;
    color: #198754;
}

.express-tour-item .badge {
    margin-left: auto;
    background: linear-gradient(135deg, #198754 0%, #15803d 100%);
    font-size: 10px;
    padding: 4px 8px;
}

.express-tour-item.tour-active {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
}

.express-tour-item.tour-active i {
    color: #dc2626;
}

.express-tour-item.tour-active .badge {
    background: #dc2626;
}

/* Driver.js - Enhanced styling for ExpressTour */
.driver-popover {
    font-family: 'Jost', sans-serif;
    border: 2px solid #198754;
    border-radius: 16px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(25, 135, 84, 0.1) !important;
    max-width: 420px !important;
    padding: 0 !important;
    overflow: hidden;
}

.driver-popover-title {
    font-family: 'Jost', sans-serif;
    font-weight: 700;
    font-size: 18px !important;
    color: #0f4c3a;
    padding: 20px 20px 0 20px !important;
    margin: 0 !important;
    display: flex;
    align-items: center;
    gap: 10px;
}

.driver-popover-description {
    font-family: 'Inter', 'Jost', sans-serif;
    color: #4b5563;
    line-height: 1.6;
    padding: 15px 20px !important;
    margin: 0 !important;
    max-height: 350px;
    overflow-y: auto;
}

.driver-popover-footer {
    padding: 15px 20px !important;
    background: linear-gradient(135deg, #f8faf9 0%, #f0fdf4 100%);
    border-top: 1px solid rgba(25, 135, 84, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.driver-popover-progress-text {
    font-size: 13px !important;
    font-weight: 600;
    color: #198754;
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    padding: 6px 14px;
    border-radius: 20px;
}

.driver-popover-navigation-btns {
    display: flex;
    gap: 8px;
}

.driver-popover-prev-btn {
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb) !important;
    color: #374151 !important;
    border: 1px solid #d1d5db !important;
    border-radius: 10px !important;
    padding: 10px 18px !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    transition: all 0.2s ease !important;
}

.driver-popover-prev-btn:hover {
    background: linear-gradient(135deg, #e5e7eb, #d1d5db) !important;
    transform: translateY(-1px);
}

.driver-popover-next-btn,
.driver-popover-done-btn {
    background: linear-gradient(135deg, #198754, #157347) !important;
    color: white !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 10px 20px !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    box-shadow: 0 4px 12px rgba(25, 135, 84, 0.3) !important;
    transition: all 0.2s ease !important;
}

.driver-popover-next-btn:hover,
.driver-popover-done-btn:hover {
    background: linear-gradient(135deg, #157347, #0f5132) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(25, 135, 84, 0.4) !important;
}

.driver-popover-arrow-side-left { border-right-color: #198754 !important; }
.driver-popover-arrow-side-right { border-left-color: #198754 !important; }
.driver-popover-arrow-side-top { border-bottom-color: #198754 !important; }
.driver-popover-arrow-side-bottom { border-top-color: #198754 !important; }

/* Highlight styling */
.driver-active-element {
    box-shadow: 0 0 0 4px rgba(25, 135, 84, 0.4), 0 0 0 8px rgba(25, 135, 84, 0.15) !important;
    border-radius: 8px;
}

.tour-icon-box { flex-shrink: 0; }

.tour-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tour-content p {
    margin: 0;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.7;
}

.tour-content .tour-highlight {
    color: #198754;
    font-weight: 700;
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    padding: 2px 8px;
    border-radius: 4px;
}

.tour-content .tour-feature-list,
.tour-welcome-content .tour-feature-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 10px 0;
}

.tour-content .tour-feature-item,
.tour-welcome-content .tour-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    font-weight: 500;
    color: #065f46;
    padding: 10px 14px;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-radius: 10px;
    border: 1px solid rgba(25, 135, 84, 0.2);
    line-height: 1.4;
}

.tour-content .tour-tip,
.tour-welcome-content .tour-tip {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(251, 191, 36, 0.3);
    margin-top: 5px;
}

.tour-content .tour-tip span,
.tour-welcome-content .tour-tip span {
    font-size: 13px;
    color: #92400e;
    font-weight: 500;
    line-height: 1.5;
}

.tour-content .tour-tip strong,
.tour-welcome-content .tour-tip strong {
    color: #78350f;
}

/* Using default Driver.js button and arrow styles */

/* Exit Tour button */
.tour-exit-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    font-size: 18px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
}

.tour-exit-btn:hover {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fecaca;
    transform: scale(1.1);
}

/* Exit Confirmation Modal */
.exit-tour-confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.exit-tour-confirm-modal.show {
    opacity: 1;
    visibility: visible;
}

.exit-tour-confirm-box {
    background: #ffffff;
    border-radius: 20px;
    padding: 30px 35px;
    max-width: 380px;
    text-align: center;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    pointer-events: auto;
    position: relative;
    z-index: 1000002;
}

.exit-tour-confirm-icon { font-size: 48px; margin-bottom: 15px; }
.exit-tour-confirm-title { font-size: 22px; font-weight: 700; color: #1e293b; margin-bottom: 10px; }
.exit-tour-confirm-text { font-size: 14px; color: #64748b; margin-bottom: 25px; }
.exit-tour-confirm-buttons { display: flex; gap: 12px; justify-content: center; pointer-events: auto; }

.exit-tour-btn-cancel {
    padding: 12px 24px;
    background: linear-gradient(135deg, #198754 0%, #146c43 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    pointer-events: auto;
    position: relative;
    z-index: 1000002;
    transition: all 0.2s ease;
}

.exit-tour-btn-cancel:hover {
    background: linear-gradient(135deg, #157347 0%, #0f5132 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(25, 135, 84, 0.3);
}

.exit-tour-btn-confirm {
    padding: 12px 24px;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #dc2626;
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    pointer-events: auto;
    position: relative;
    z-index: 1000002;
    transition: all 0.2s ease;
}

.exit-tour-btn-confirm:hover {
    background: linear-gradient(135deg, #fecaca 0%, #fca5a5 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

/* Tour blocked popup */
.tour-blocked-popup {
    position: fixed;
    background: linear-gradient(135deg, #dc3545 0%, #b02a37 100%);
    color: #ffffff;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    z-index: 1000000;
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
}

.tour-blocked-popup.show { opacity: 1; }

/* Tour Active State */
/* Fix for Driver.js positioning with fixed elements */
body.express-tour-active {
    overflow: visible !important;
}

body.express-tour-active .main-content {
    overflow: visible !important;
}

body.express-tour-active .main-content-wrapper {
    overflow: visible !important;
}

/* Temporarily make sidebar absolute during tour for proper popover positioning */
body.express-tour-active .app-sidebar {
    position: absolute !important;
}

/* Ensure Driver.js overlay and popover have correct z-index */
.driver-overlay {
    z-index: 99999 !important;
}

.driver-active-element {
    z-index: 100000 !important;
}

.driver-popover {
    z-index: 100001 !important;
}

body.express-tour-active .driver-popover,
body.express-tour-active .driver-popover * {
    pointer-events: auto;
    cursor: pointer;
}

/* Welcome styling */
.tour-welcome-content {
    text-align: center;
    padding: 12px 0;
}

.tour-welcome-content .tour-logo {
    width: 90px;
    height: 90px;
    margin: 0 auto 20px;
    border-radius: 20px;
    box-shadow: 0 12px 32px rgba(25, 135, 84, 0.25);
}

.tour-welcome-content h3 {
    font-size: 22px;
    font-weight: 700;
    color: #0f4c3a;
    margin-bottom: 10px;
}

.tour-welcome-content p {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 20px;
}

.tour-welcome-content .tour-duration {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 14px;
    color: #166534;
    font-weight: 600;
}

/* Mobile responsive - using default Driver.js styles */
