/**
 * BookATee Guided Tour & Setup Checklist Styles
 * 
 * Styles for:
 * - Welcome modal
 * - Shepherd.js tour customization
 * - Setup checklist widget
 */

/* ==========================================
   CSS VARIABLES
   ========================================== */

:root {
    --tour-primary: #2e7d32;
    --tour-primary-hover: #1b5e20;
    --tour-secondary: #757575;
    --tour-secondary-hover: #616161;
    --tour-success: #4caf50;
    --tour-success-light: #e8f5e9;
    --tour-overlay: rgba(0, 0, 0, 0.6);
    --tour-modal-bg: #ffffff;
    --tour-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    --tour-radius: 12px;
    --tour-transition: all 0.3s ease;
}

/* ==========================================
   WELCOME MODAL
   ========================================== */

.tour-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--tour-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.tour-modal-overlay.tour-modal-visible {
    opacity: 1;
}

.tour-modal {
    background: var(--tour-modal-bg);
    border-radius: var(--tour-radius);
    box-shadow: var(--tour-shadow);
    max-width: 500px;
    width: 100%;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.tour-modal-visible .tour-modal {
    transform: scale(1) translateY(0);
}

.tour-modal-header {
    background: linear-gradient(135deg, #1a472a 0%, #1b5e20 100%);
    color: #ffffff;
    padding: 30px;
    text-align: center;
}

.tour-modal-icon {
    display: none;
}

.tour-modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.tour-modal-body {
    padding: 25px 30px;
}

.tour-modal-body p {
    margin: 0 0 10px;
    color: #333;
    line-height: 1.6;
}

.tour-modal-subtitle {
    color: #666 !important;
    font-size: 0.9em;
}

.tour-modal-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 20px;
}

.tour-feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #f5f5f5;
    border-radius: 8px;
    font-size: 0.9em;
}

.tour-feature-icon {
    font-size: 20px;
}

.tour-modal-footer {
    padding: 20px 30px;
    background: #fafafa;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.tour-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
    color: #666;
    cursor: pointer;
}

.tour-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.tour-modal-buttons {
    display: flex;
    gap: 10px;
}

.tour-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--tour-transition);
}

.tour-btn-primary {
    background: var(--tour-primary);
    color: white;
}

.tour-btn-primary:hover {
    background: var(--tour-primary-hover);
}

.tour-btn-secondary {
    background: transparent;
    color: var(--tour-secondary);
    border: 1px solid #ddd;
}

.tour-btn-secondary:hover {
    background: #f5f5f5;
    color: var(--tour-secondary-hover);
}

/* ==========================================
   SHEPHERD.JS TOUR CUSTOMIZATION
   ========================================== */

.shepherd-modal-overlay-container {
    z-index: 99998 !important;
}

.shepherd-element {
    z-index: 99999 !important;
}

.bookatee-tour-step {
    background: white;
    border-radius: var(--tour-radius);
    box-shadow: var(--tour-shadow);
    max-width: 400px;
}

.bookatee-tour-step .shepherd-content {
    padding: 0;
}

.bookatee-tour-step .shepherd-header,
.shepherd-element.bookatee-tour-step .shepherd-header,
.shepherd-element .shepherd-header {
    background: #1a472a !important;
    background: linear-gradient(135deg, #1a472a 0%, #1b5e20 100%) !important;
    padding: 15px 20px !important;
    border-radius: var(--tour-radius) var(--tour-radius) 0 0 !important;
}

.bookatee-tour-step .shepherd-title,
.shepherd-element.bookatee-tour-step .shepherd-title,
.shepherd-element .shepherd-title,
.shepherd-element .shepherd-header .shepherd-title {
    color: #ffffff !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    margin: 0 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
}

.bookatee-tour-step .shepherd-cancel-icon,
.shepherd-element .shepherd-cancel-icon {
    color: rgba(255, 255, 255, 0.7) !important;
}

.bookatee-tour-step .shepherd-cancel-icon:hover,
.shepherd-element .shepherd-cancel-icon:hover {
    color: white !important;
}

.bookatee-tour-step .shepherd-text {
    padding: 20px;
    color: #333;
    line-height: 1.6;
    font-size: 14px;
}

.bookatee-tour-step .shepherd-text p {
    margin: 0 0 10px;
}

.bookatee-tour-step .shepherd-text p:last-child {
    margin-bottom: 0;
}

.bookatee-tour-step .shepherd-text ul {
    margin: 10px 0;
    padding-left: 20px;
}

.bookatee-tour-step .shepherd-text li {
    margin-bottom: 5px;
}

.bookatee-tour-step .shepherd-footer {
    padding: 15px 20px;
    background: #fafafa;
    border-top: 1px solid #eee;
    border-radius: 0 0 var(--tour-radius) var(--tour-radius);
}

.bookatee-tour-step .shepherd-button {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--tour-transition);
    border: none;
}

.bookatee-tour-step .shepherd-button-primary {
    background: var(--tour-primary);
    color: white;
}

.bookatee-tour-step .shepherd-button-primary:hover {
    background: var(--tour-primary-hover);
}

.bookatee-tour-step .shepherd-button-secondary {
    background: transparent;
    color: var(--tour-secondary);
    border: 1px solid #ddd;
}

.bookatee-tour-step .shepherd-button-secondary:hover {
    background: #f0f0f0;
}

/* Arrow styling */
.bookatee-tour-step .shepherd-arrow,
.bookatee-tour-step .shepherd-arrow::before {
    background: white;
}

.bookatee-tour-step[data-popper-placement^="bottom"] .shepherd-arrow::before {
    background: linear-gradient(135deg, #1a472a 0%, #1b5e20 100%);
}

/* ==========================================
   SETUP CHECKLIST WIDGET
   ========================================== */

/* Sidebar checklist positioning */
.setup-checklist-widget {
    position: fixed;
    top: 100px;
    right: 20px;
    width: 320px;
    max-height: calc(100vh - 140px);
    background: white;
    border-radius: var(--tour-radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    border: 1px solid #e0e0e0;
    transition: var(--tour-transition);
    z-index: 9999;
}

.setup-checklist-widget.hidden {
    display: none;
}

/* Minimized state - just shows header */
.setup-checklist-widget.minimized {
    width: auto;
    max-height: none;
}

.setup-checklist-widget.minimized .checklist-body {
    display: none;
}

.setup-checklist-widget.checklist-highlight {
    animation: checklist-pulse 0.6s ease-in-out 3;
}

@keyframes checklist-pulse {
    0%, 100% {
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(46, 125, 50, 0.3);
    }
}

.setup-checklist-widget.all-complete {
    border-color: var(--tour-success);
}

.setup-checklist-widget.all-complete .checklist-header {
    background: linear-gradient(135deg, var(--tour-success) 0%, #66bb6a 100%);
}

.checklist-header {
    background: linear-gradient(135deg, #1a472a 0%, #1b5e20 100%);
    color: #ffffff;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.checklist-header:hover {
    filter: brightness(1.05);
}

.checklist-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 15px;
}

.checklist-icon {
    font-size: 20px;
}

.checklist-progress {
    background: rgba(255, 255, 255, 0.2);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.checklist-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--tour-transition);
}

.checklist-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
}

.toggle-icon {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.checklist-body {
    max-height: calc(100vh - 240px);
    overflow-y: auto;
    transition: max-height 0.3s ease;
}

.checklist-body.collapsed {
    max-height: 0;
    overflow: hidden;
}

.checklist-items {
    padding: 15px;
}

.checklist-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 15px;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: var(--tour-transition);
    border: 1px solid transparent;
}

.checklist-item:last-child {
    margin-bottom: 0;
}

.checklist-item:hover {
    background: #f0f0f0;
    border-color: #ddd;
}

.checklist-item.completed {
    background: var(--tour-success-light);
    border-color: #c8e6c9;
}

.checklist-item.completed .checklist-item-title {
    color: var(--tour-primary);
}

.checklist-item.completed .checklist-item-action {
    background: var(--tour-success);
}

.checklist-item-status {
    width: 24px;
    height: 24px;
    min-width: 24px;
    border-radius: 50%;
    border: 2px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: white;
    background: white;
    margin-top: 2px;
}

.checklist-item.completed .checklist-item-status {
    background: var(--tour-success);
    border-color: var(--tour-success);
}

.checklist-item-content {
    flex: 1;
    min-width: 0;
}

.checklist-item-title {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.optional-badge {
    font-size: 10px;
    font-weight: 500;
    background: #e0e0e0;
    color: #666;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.checklist-item-description {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

.checklist-item-action {
    background: var(--tour-primary);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--tour-transition);
    align-self: center;
}

.checklist-item-action:hover {
    background: var(--tour-primary-hover);
    transform: translateX(2px);
}

.checklist-item.completed .checklist-item-action:hover {
    background: #43a047;
}

.checklist-footer {
    padding: 15px;
    background: #fafafa;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.checklist-dismiss-btn {
    background: transparent;
    border: 1px solid #ddd;
    color: #666;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: var(--tour-transition);
}

.checklist-dismiss-btn:hover {
    background: #f0f0f0;
    color: #333;
}

.checklist-restart-tour-btn {
    background: transparent;
    border: 1px solid var(--tour-primary);
    color: var(--tour-primary);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: var(--tour-transition);
}

.checklist-restart-tour-btn:hover {
    background: var(--tour-primary);
    color: white;
}

/* ==========================================
   RESPONSIVE STYLES
   ========================================== */

/* Tablet: narrower sidebar */
@media (max-width: 1200px) {
    .setup-checklist-widget {
        width: 280px;
        right: 10px;
    }
}

/* Mobile: bottom sheet style */
@media (max-width: 768px) {
    .setup-checklist-widget {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-height: 60vh;
        border-radius: var(--tour-radius) var(--tour-radius) 0 0;
        border-bottom: none;
    }
    
    .setup-checklist-widget.minimized {
        max-height: 56px;
    }
}

@media (max-width: 600px) {
    .tour-modal {
        max-width: 100%;
        margin: 10px;
    }

    .tour-modal-header {
        padding: 20px;
    }

    .tour-modal-icon {
        font-size: 36px;
    }

    .tour-modal-header h2 {
        font-size: 20px;
    }

    .tour-modal-body {
        padding: 20px;
    }

    .tour-modal-features {
        grid-template-columns: 1fr;
    }

    .tour-modal-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .tour-modal-buttons {
        width: 100%;
        justify-content: stretch;
    }

    .tour-modal-buttons .tour-btn {
        flex: 1;
    }

    .bookatee-tour-step {
        max-width: calc(100vw - 30px);
    }

    .checklist-item {
        flex-wrap: wrap;
    }

    .checklist-item-action {
        margin-top: 10px;
        width: 100%;
        text-align: center;
    }

    .checklist-footer {
        flex-direction: column;
    }

    .checklist-footer button {
        width: 100%;
    }
}

/* ==========================================
   ANIMATION UTILITIES
   ========================================== */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.setup-checklist-widget.visible {
    animation: slideUp 0.4s ease;
}
