/* Custom Shepherd.js Tour Styles for Hospital Portal */

/* Tour Button Styles */
.tour-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 25px;
    box-shadow: 0 4px 6px rgba(102, 126, 234, 0.25);
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
}

.tour-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.35);
}

.tour-button:active {
    transform: translateY(0);
}

.tour-button i {
    font-size: 1rem;
}

.tour-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.tour-button:hover::before {
    left: 100%;
}

/* Pulse animation for tour button */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(102, 126, 234, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0);
    }
}

.tour-button.pulse {
    animation: pulse 2s infinite;
}

/* Mobile responsive tour button */
@media (max-width: 768px) {
    .tour-button {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .tour-button-text {
        display: none;
    }
}

/* Shepherd.js Custom Theme */
.shepherd-element {
    z-index: 9999 !important;
    max-width: 400px;
}

.shepherd-theme-custom {
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.shepherd-theme-custom .shepherd-content {
    border-radius: 12px;
    padding: 0;
    background: #ffffff;
}

.shepherd-theme-custom .shepherd-header {
    background: #343a40!important;
    padding: 1rem 1.25rem;
    border-radius: 12px 12px 0 0;
}

.shepherd-theme-custom .shepherd-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

.shepherd-theme-custom .shepherd-cancel-icon {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 300;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.shepherd-theme-custom .shepherd-cancel-icon:hover {
    opacity: 1;
}

.shepherd-theme-custom .shepherd-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #4a5568;
    padding: 1rem 1.25rem;
}

.shepherd-theme-custom .shepherd-footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid #e2e8f0;
    background: #343a40!important;
    border-radius: 0 0 12px 12px;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.shepherd-theme-custom .shepherd-button {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.shepherd-button-primary {
    background: #007bff;
    color: white;
}

.shepherd-button-primary:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.shepherd-button-secondary {
    background: #6c757d;
    color: white;
}

.shepherd-button-secondary:hover {
    background: #5a6268;
}

/* Shepherd Modal Overlay */
.shepherd-modal-overlay-container {
    background: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Highlighted element styling */
.shepherd-enabled.shepherd-element-attached-top .shepherd-target {
    outline: 3px solid #667eea !important;
    outline-offset: 4px;
}

.shepherd-target-click-disabled.shepherd-enabled.shepherd-target {
    pointer-events: auto !important;
}

/* Arrow styling */
.shepherd-theme-custom .shepherd-arrow {
    display: none; /* Hide arrows for cleaner look, or customize below */
}

/* If you want to show arrows, uncomment and customize: */
/*
.shepherd-theme-custom .shepherd-arrow:before {
    background: #667eea;
}
*/

/* Animations for Shepherd */
.shepherd-element {
    animation: shepherdSlideIn 0.3s ease;
}

@keyframes shepherdSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .shepherd-element {
        max-width: calc(100vw - 40px);
        margin: 0 20px;
    }
    
    .shepherd-theme-custom .shepherd-title {
        font-size: 1.1rem;
    }
    
    .shepherd-theme-custom .shepherd-text {
        font-size: 0.9rem;
    }
    
    .shepherd-theme-custom .shepherd-button {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .shepherd-theme-custom .shepherd-content {
        background: #1a202c;
        color: #e2e8f0;
    }
    
    .shepherd-theme-custom .shepherd-text {
        color: #cbd5e0;
    }
    
    .shepherd-modal-overlay-container {
        background: rgba(0, 0, 0, 0.8);
    }
}

/* Tour completion badge */
.tour-completed-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #38a169;
    background: #c6f6d5;
    border-radius: 12px;
    margin-left: 0.5rem;
}

/* Navbar tour button container */
.navbar .tour-button {
    margin-left: 1rem;
    padding: 0.4rem 0.9rem;
    font-size: 0.85rem;
}

@media (max-width: 991px) {
    .navbar .tour-button {
        margin-top: 0.5rem;
        margin-left: 0;
    }
}

/* Override Shepherd defaults for better integration */
.shepherd-enabled {
    z-index: 9998 !important;
}

.shepherd-modal-is-visible {
    pointer-events: none;
}

.shepherd-target {
    pointer-events: auto;
    position: relative;
    z-index: 9999;
}

/* Prevent body scroll when tour is active */
body.shepherd-active {
    overflow: hidden !important;
    position: fixed !important;
    width: 100%;
}

/* Prevent ANY scrolling during tour */
.shepherd-modal-is-visible,
.shepherd-modal-is-visible body,
body:has(.shepherd-modal-is-visible) {
    overflow: hidden !important;
}

/* Disable smooth scrolling during tours */
html.shepherd-active,
body.shepherd-active {
    scroll-behavior: auto !important;
}

/* Ensure shepherd elements don't trigger scroll */
.shepherd-element,
.shepherd-content,
.shepherd-text,
.shepherd-header,
.shepherd-footer {
    scroll-behavior: auto !important;
}

/* Ensure smooth scrolling only when needed */
.shepherd-element-attached {
    scroll-behavior: auto !important;
}

/* Custom progress indicator */
.shepherd-theme-custom .shepherd-progress {
    background: #e2e8f0;
    height: 4px;
    border-radius: 2px;
    margin: 0 1.25rem 0.5rem;
    overflow: hidden;
}

.shepherd-theme-custom .shepherd-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}
