/* Custom styles for Shepherd tour */
.shepherd-element {
    max-width: 400px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    z-index: 10000 !important; /* Ensure dialog is above all elements */
}

/* Mobile-specific styles for shepherd dialogs */
@media (max-width: 767px) {
    .shepherd-element {
        max-width: 90% !important;
        width: 90% !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        position: fixed !important;
        margin: 0 !important;
    }
    
    /* Smaller font sizes on mobile */
    .shepherd-text {
        font-size: 0.9rem !important;
        padding: 15px !important;
    }
    
    .shepherd-title {
        font-size: 1rem !important;
    }
    
    /* Optimize buttons for mobile */
    .shepherd-button {
        padding: 10px 15px !important;
        font-size: 0.9rem !important;
    }
}

.shepherd-header,
.shepherd-element .shepherd-header,
.shepherd-theme-custom .shepherd-header {
    background-color: #4A773C !important; /* Driscoll's brand green with !important */
    padding: 15px 20px;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.shepherd-title {
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    color: #FFFFFF; /* Fixed white color for better visibility */
    text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.3); /* Text shadow for better contrast */
}

.shepherd-text {
    color: var(--brand-grey);
    padding: 20px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.shepherd-footer {
    padding: 10px 20px 15px;
    display: flex;
    justify-content: space-between;
}

.shepherd-button {
    border-radius: 8px;
    padding: 8px 16px;
    font-weight: 600;
    letter-spacing: 0.2px;
    transition: all 0.2s ease;
}

.shepherd-button-primary {
    background-color: var(--brand-green);
    color: var(--brand-white);
}

.shepherd-button-primary:hover {
    background-color: #3a5f30; /* Darker green on hover */
}

.shepherd-button-secondary {
    background-color: #f8f8f8;
    color: var(--brand-grey);
    border: 1px solid #ddd;
}

.shepherd-button-secondary:hover {
    background-color: #ebebeb;
}

.shepherd-arrow:before {
    background-color: #4A773C; /* Matching the header's Driscoll's brand green */
}

/* Highlight elements during tour */
.tour-highlight {
    position: relative;
    z-index: 9999 !important;
    box-shadow: 0 0 0 3px var(--brand-green), 0 0 0 8px rgba(74, 119, 60, 0.2) !important;
    border-radius: 4px;
    transition: all 0.3s ease;
}

/* Modal overlay should be visible but not too dark */
.shepherd-modal-overlay-container {
    z-index: 9998 !important;
    opacity: 0.7 !important;
}

/* Force positioning for conclusion steps that don't have attachTo elements */
.shepherd-step[data-id="conclusion"],
.shepherd-step[data-id="upload-conclusion"] {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
}

/* Fix for edge cases in Safari on iOS */
@supports (-webkit-touch-callout: none) {
    /* Safari on iOS specific fix */
    .shepherd-element {
        transform: translate(-50%, -50%) scale(1) !important;
        position: fixed !important;
    }
    
    /* Safari iOS needs an additional z-index boost */
    .shepherd-element,
    .shepherd-modal-overlay-container {
        z-index: 99999 !important;
    }
}