/**
 * Tour Component Styles for Benchable
 * Custom styling for Shepherd.js guided tours
 */

/* Tour Button Styling - Match existing button patterns */
.shepherd-theme-custom .shepherd-button {
    border-radius: var(--border-radius-sm);
    font-family: var(--body-font);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-normal);
    padding: 0.375rem 0.75rem;
    transition: all var(--transition-speed) var(--transition-timing);
    border: 1px solid transparent;
    text-decoration: none;
    display: inline-block;
    line-height: 1.5;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
}

/* Primary button styling */
.shepherd-theme-custom .shepherd-button.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--text-on-primary);
}

.shepherd-theme-custom .shepherd-button.btn-primary:hover {
    background-color: rgba(var(--primary-color-rgb), 0.85);
    border-color: rgba(var(--primary-color-rgb), 0.85);
    transform: translateY(-1px);
}

/* Secondary button styling */
.shepherd-theme-custom .shepherd-button.btn-secondary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--text-on-secondary);
}

.shepherd-theme-custom .shepherd-button.btn-secondary:hover {
    background-color: rgba(var(--secondary-color-rgb), 0.85);
    border-color: rgba(var(--secondary-color-rgb), 0.85);
}

/* Outline primary button styling */
.shepherd-theme-custom .shepherd-button.btn-outline-primary {
    background-color: transparent;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.shepherd-theme-custom .shepherd-button.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--text-on-primary);
}

/* Success button styling */
.shepherd-theme-custom .shepherd-button.btn-success {
    background-color: var(--success-color);
    border-color: var(--success-color);
    color: var(--text-on-success);
}

.shepherd-theme-custom .shepherd-button.btn-success:hover {
    background-color: rgba(var(--success-color-rgb), 0.85);
    border-color: rgba(var(--success-color-rgb), 0.85);
    transform: translateY(-1px);
}

/* Tour popover styling */
.shepherd-theme-custom.shepherd-element {
    background: var(--card-bg) !important;
    border: 4px solid var(--primary-color) !important;
    border-radius: var(--card-border-radius) !important;
    box-shadow: var(--shadow-lg) !important;
    max-width: 400px;
    z-index: 9999;
}

/* Tour header - increased specificity */
.shepherd-theme-custom.shepherd-element .shepherd-content .shepherd-header,
.shepherd-theme-custom .shepherd-has-title .shepherd-content .shepherd-header {
    background: var(--primary-color) !important;
    border-bottom: none !important;
    padding: var(--spacing-md) !important;
    border-radius: calc(var(--card-border-radius) - 4px) calc(var(--card-border-radius) - 4px) 0 0 !important;
}

.shepherd-theme-custom .shepherd-title {
    color: var(--text-on-primary) !important;
    font-family: var(--heading-font);
    font-size: 1.1rem;
    font-weight: var(--font-weight-bold);
    margin: 0;
}

/* Tour content */
.shepherd-theme-custom .shepherd-text {
    color: var(--bs-body-color) !important;
    font-family: var(--body-font);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    padding: var(--spacing-md);
    background: var(--card-bg) !important;
}

.shepherd-theme-custom .shepherd-text p {
    margin-bottom: var(--spacing-sm);
    color: var(--bs-body-color) !important;
}

.shepherd-theme-custom .shepherd-text p:last-child {
    margin-bottom: 0;
}

.shepherd-theme-custom .shepherd-text ul,
.shepherd-theme-custom .shepherd-text ol {
    color: var(--bs-body-color) !important;
}

.shepherd-theme-custom .shepherd-text li {
    color: var(--bs-body-color) !important;
}

/* Tour footer */
.shepherd-theme-custom .shepherd-footer {
    background: var(--tour-footer-bg) !important;
    border-top: 1px solid var(--border-color) !important;
    border-radius: 0 0 calc(var(--card-border-radius) - 4px) calc(var(--card-border-radius) - 4px) !important;
    padding: var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-sm);
}

/* Progress indicator */
.shepherd-theme-custom .shepherd-progress {
    background: var(--subtle-bg-color);
    border-radius: var(--border-radius-sm);
    height: 4px;
    margin-bottom: var(--spacing-sm);
    overflow: hidden;
}

.shepherd-theme-custom .shepherd-progress-bar {
    background: var(--primary-color);
    height: 100%;
    transition: width var(--transition-speed) var(--transition-timing);
}

/* Tour arrow styling */
.shepherd-theme-custom .shepherd-arrow {
    border-color: var(--card-bg);
}

.shepherd-theme-custom .shepherd-arrow:before {
    border-color: var(--primary-color);
    background-color: var(--primary-color) !important;
}

/* Arrow positioning adjustments for border offset */
.shepherd-theme-custom.shepherd-element[data-popper-placement^="top"] .shepherd-arrow {
    bottom: -12px;
}

.shepherd-theme-custom.shepherd-element[data-popper-placement^="bottom"] .shepherd-arrow {
    top: -12px;
}

.shepherd-theme-custom.shepherd-element[data-popper-placement^="left"] .shepherd-arrow {
    right: -12px;
}

.shepherd-theme-custom.shepherd-element[data-popper-placement^="right"] .shepherd-arrow {
    left: -12px;
}

/* Modal overlay */
.shepherd-modal-overlay-container {
    background: rgba(var(--dark-color-rgb), 0.5);
    z-index: 9998;
}

/* Tour trigger buttons */
.tour-trigger-btn {
    position: relative;
}

.tour-trigger-btn .bi-question-circle {
    margin-right: 0.25rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .shepherd-theme-custom.shepherd-element {
        max-width: 90vw;
        margin: 0 5vw;
    }
    
    .shepherd-theme-custom .shepherd-text {
        font-size: var(--font-size-sm);
    }
    
    .shepherd-theme-custom .shepherd-footer {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .shepherd-theme-custom .shepherd-footer .shepherd-button {
        width: 100%;
        justify-content: center;
    }
}

/* Accessibility improvements */
.shepherd-theme-custom .shepherd-button:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Animation for tour appearance */
.shepherd-theme-custom.shepherd-element {
    animation: tourFadeIn 0.3s ease-out;
}

@keyframes tourFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Highlight effect for tour targets */
.shepherd-target-highlighted {
    position: relative;
    z-index: 9997;
}

/* Custom step indicators */
.shepherd-theme-custom .shepherd-step-indicator {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

.shepherd-theme-custom .shepherd-step-indicator .step-number {
    background: var(--primary-color);
    color: var(--text-on-primary);
    border-radius: 50%;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: var(--font-weight-bold);
}

.highlighted-step-element {
    box-shadow: 0 0 0 4px rgba(var(--primary-color-rgb), 0.5);
    border-radius: 4px;
    transition: box-shadow 0.3s ease-in-out;
} 