/* ==========================================================================
   CENTRALIZED CSS FOR BOOKING PLATFORM
   ========================================================================== */

/* Concert Card Enhancements */
.concert-card {
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.concert-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.concert-card .card-body {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.concert-card .border-top {
    margin-top: auto;
}

/* Global Animations */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

.spin {
    animation: spin 1s linear infinite;
}

/* Dashboard Specific Styles */
.stat-card {
    transition: all 0.3s ease;
    border: none !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Purple theme colors */
.bg-purple {
    background-color: #6f42c1 !important;
}

.text-purple {
    color: #6f42c1 !important;
}

.text-purple {
    color: #6f42c1 !important;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }
    
    .btn-sm {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
    
    /* Dashboard stats cards - stack vertically on mobile */
    .row.g-3 .col-xl-2,
    .row.g-3 .col-lg-3,
    .row.g-3 .col-md-6 {
        margin-bottom: 0.75rem;
    }
    
    /* Compact metric icons on mobile */
    .metric-icon {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
    
    /* Smaller headings on mobile */
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.3rem;
    }
    
    h3 {
        font-size: 1.1rem;
    }
    
    /* Table responsiveness */
    .table-responsive {
        border: none;
    }
    
    /* Quick upload widget positioning on mobile */
    #quickUploadWidget {
        width: calc(100vw - 20px) !important;
        max-width: 320px;
    }
    
    /* Floating button size on mobile */
    #floatingUploadBtn {
        width: 50px !important;
        height: 50px !important;
        font-size: 1rem !important;
    }
    
    /* Navigation improvements */
    .navbar-nav .nav-link {
        padding: 0.5rem 0.75rem;
    }
    
    /* Form improvements */
    .form-control,
    .form-select {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    
    /* Modal improvements */
    .modal-dialog {
        margin: 0.5rem;
    }
    
    /* Toast positioning on mobile */
    .toast-container {
        padding: 0.5rem !important;
        top: 10px !important;
        right: 10px !important;
        left: 10px !important;
        width: auto !important;
    }
    
    .toast {
        margin-bottom: 0.5rem !important;
        width: 100% !important;
        max-width: none !important;
    }
    
    /* Card spacing */
    .card {
        margin-bottom: 1rem;
    }
}

/* Keep navbar icon + label on one line on desktop (prevents ugly wraps in admin top menu) */
@media (min-width: 992px) {
    .navbar-expand-lg .navbar-nav .nav-link {
        white-space: nowrap;
    }
}

@media (max-width: 768px) {
    .band-documents .row {
        gap: 1rem;
        flex-wrap: wrap;
    }

    .band-documents .btn-group {
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 0.25rem;
    }

    .band-documents .btn-group .btn {
        flex: 1 1 auto;
        min-width: 140px;
    }
}

@media (max-width: 576px) {
    .band-documents .btn-group .btn {
        min-width: 0;
    }
}

@media (max-width: 576px) {
    /* Extra small screens */
    .container {
        padding-left: 5px;
        padding-right: 5px;
    }
    
    /* Stack file statistics badges vertically */
    .d-flex.gap-2.flex-wrap {
        flex-direction: column !important;
        align-items: center !important;
        gap: 0.25rem !important;
    }
    
    /* Compact calendar on mobile */
    .fc-toolbar {
        flex-direction: column;
    }
    
    .fc-toolbar-chunk {
        margin: 0.25rem 0;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .btn,
    .form-control,
    .form-select {
        min-height: 44px;
    }
    
    /* Remove hover effects on touch devices */
    .stat-card:hover {
        transform: none;
        box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    }
    
    /* Larger clickable areas */
    .nav-link,
    .dropdown-item {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

.metric-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.chart-container {
    position: relative;
}

/* Tour Calendar Specific Styles */
.tour-period-highlight {
    position: relative;
}

.tour-period-highlight::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    opacity: 0.6;
    pointer-events: none;
    z-index: 1;
}

.tour-period-highlight .fc-daygrid-day-number {
    position: relative;
    z-index: 2;
    font-weight: 600;
    color: #1976d2;
}

.fc-day-today.tour-period-highlight {
    background-color: #fff3e0 !important;
}

.fc-day-today.tour-period-highlight::before {
    background: linear-gradient(135deg, #fff3e0 0%, #fce4ec 100%);
}

/* Layout Components */
.sticky-top-custom {
    top: 1rem;
}

/* Component Dimensions */
.icon-circle-sm { width: 24px; height: 24px; }
.icon-circle-md { width: 32px; height: 32px; }
.icon-circle-lg { width: 40px; height: 40px; }
.icon-circle-xl { width: 50px; height: 50px; }
.icon-circle-xxl { width: 60px; height: 60px; }
.icon-circle-huge { width: 80px; height: 80px; }

.progress-mini { width: 100px; height: 6px; }
.progress-custom { height: 8px; }

/* Font Sizes */
.fs-tiny { font-size: 0.7rem; }
.fs-xs { font-size: 0.7em; }
.fs-10px { font-size: 10px; }
.fs-huge { font-size: 2rem; }
.fs-massive { font-size: 2.5rem; }
.fs-giant { font-size: 3rem; }
.fs-enormous { font-size: 4rem; }

/* Text Formatting */
.lh-tight { line-height: 1.4; }

/* Interactive Elements */
.hover-shadow {
    transition: all 0.2s ease-in-out;
}

.hover-shadow:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.2s ease-in-out;
    z-index: 999;
}

.location-card:hover {
    border-color: var(--bs-primary) !important;
}

.tour-card:hover {
    border-color: var(--bs-primary) !important;
}

.todo-item {
    transition: all 0.2s ease-in-out;
}

.todo-item:hover {
    background-color: rgba(0,123,255,0.05);
    z-index: 1;
}

.export-option {
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

.export-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Map Elements */
.marker-pin {
    position: relative;
    width: 20px;
    height: 20px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    margin: -10px 0 0 -10px;
}

.arrow-triangle {
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 16px solid #007bff;
    position: relative;
}

/* Map Container Sizing */
.map-half { 
    height: 400px; 
}

.map-full { 
    height: 400px; 
    width: 100%; 
}

/* Dropdown Fixes */
.dropdown-menu {
    z-index: 999 !important;
}

.dropdown {
    position: relative;
}

.dropdown-custom {
    max-height: 200px;
    overflow-y: auto;
}

/* Scrollable Containers */
.scrollable-200 {
    max-height: 200px;
    overflow-y: auto;
}

.scrollable-300 {
    max-height: 300px;
    overflow-y: auto;
}

.scrollable-full-w {
    width: 100%; 
    max-height: 200px; 
    overflow-y: auto;
}

/* Spacing Utilities */
.mb-15px { margin-bottom: 15px !important; }
.mb-tiny { margin-bottom: 0.125rem; }
.mt-neg-10px { margin-top: -10px; }

/* Z-index Layers */
.z-10 { z-index: 10; }
.z-11 { z-index: 11; }
.z-toast { z-index: 9999; }

/* Display Utilities */
.opacity-20 { opacity: 0.2; }
.opacity-30 { opacity: 0.3; }

/* Width Utilities */
.w-30px { width: 30px; }
.w-max-150px { max-width: 150px; }
.w-max-200px { max-width: 200px; }

/* Footer Styles */
footer a:hover {
    color: #fff !important;
    transition: color 0.2s ease;
}

footer .bi:hover {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

/* Sticky Footer Layout */
html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
}

.container-fluid, .container {
    flex: 1;
}

/* Calendar Styling */
#calendar .fc-event {
    border: none;
    padding: 2px 4px;
}

/* Stats Cards */
.stats-card {
    border-left: 4px solid var(--bs-primary);
}

/* Toast Positioning */
.toast-fixed {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

/* Global Toast Container - High z-index to be above modals */
.toast-container {
    z-index: 10000 !important;
}

/* Individual Toast - Ensure it's above everything including modals */
.toast {
    z-index: 10001 !important;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
}

/* Toast success styling */
.toast .bi-check-circle-fill {
    color: #198754 !important;
}

/* Toast error styling */
.toast .bi-exclamation-triangle-fill.text-danger {
    color: #dc3545 !important;
}

/* Toast warning styling */
.toast .bi-exclamation-triangle-fill.text-warning {
    color: #ffc107 !important;
}

/* Toast info styling */
.toast .bi-info-circle-fill {
    color: #0dcaf0 !important;
}

/* Toast copy styling */
.toast .bi-clipboard-check-fill {
    color: #198754 !important;
}

/* Progress Bars */
.progress {
    height: 8px;
}

/* Shared Hero Header Styles for Tours and Concerts */
.hero-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

/* Legacy tour-header class for backward compatibility */
.tour-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 0;
}

/* Status Badge Styles */
.status-badge {
    font-size: 0.9em;
}

/* Tab Card Styles */
.info-card {
    border-left: 4px solid #0d6efd;
}

.finance-card {
    border-left: 4px solid #198754;
}

.task-card {
    border-left: 4px solid #ffc107;
}

/* Tab Content Spacing */
.tab-content {
    padding-top: 1rem;
}

.share-buttons {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

@media (max-width: 768px) {
    .share-buttons {
        position: relative;
        top: auto;
        right: auto;
        margin-bottom: 2rem;
    }
}

/* Utility Classes for common inline styles */
.cursor-pointer { cursor: pointer; }
.position-relative { position: relative; }
.d-inline { display: inline; }

/* Background colors with opacity */
.bg-primary-10 { background-color: rgba(13, 110, 253, 0.1); }
.bg-success-10 { background-color: rgba(25, 135, 84, 0.1); }
.bg-warning-10 { background-color: rgba(255, 193, 7, 0.1); }
.bg-danger-10 { background-color: rgba(220, 53, 69, 0.1); }
.bg-info-10 { background-color: rgba(13, 202, 240, 0.1); }

/* Color utilities */
.bg-primary-30 { background-color: rgba(13, 110, 253, 0.3); }
.bg-success-30 { background-color: rgba(25, 135, 84, 0.3); }

/* ==========================================================================
   FULLCALENDAR MODERN STYLING
   ========================================================================== */

/* Modern Calendar Container */
.fc {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

#tour-calendar,
.fullcalendar-container {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Calendar Header Styling */
.fc-header-toolbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    padding: 20px !important;
    border-radius: 12px 12px 0 0 !important;
    margin-bottom: 0 !important;
}

.fc-toolbar-title {
    color: white !important;
    font-weight: 700 !important;
    font-size: 1.4rem !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

.fc-button {
    background: rgba(255, 255, 255, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: white !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    backdrop-filter: blur(10px) !important;
}

.fc-button:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

.fc-button:focus {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3) !important;
}

.fc-button:disabled {
    background: rgba(255, 255, 255, 0.1) !important;
    opacity: 0.6 !important;
}

/* Calendar Grid Styling */
.fc-daygrid {
    background: white;
}

.fc-col-header {
    background: linear-gradient(135deg, #f8f9ff 0%, #e8ecf7 100%) !important;
    border-bottom: 2px solid #e0e7ff !important;
}

.fc-col-header-cell {
    padding: 12px 8px !important;
    font-weight: 600 !important;
    color: #4f46e5 !important;
    text-transform: uppercase !important;
    font-size: 0.75rem !important;
    letter-spacing: 0.5px !important;
}

.fc-daygrid-day {
    border-color: #e5e7eb !important;
    transition: background-color 0.2s ease !important;
}

.fc-daygrid-day:hover {
    background-color: #f8faff !important;
}

.fc-daygrid-day-number {
    color: #374151 !important;
    font-weight: 500 !important;
    padding: 8px !important;
    font-size: 0.9rem !important;
}

/* Today Highlighting */
.fc-day-today {
    background: linear-gradient(135deg, #fef3cd 0%, #fde68a 100%) !important;
    border: 2px solid #fff !important;
}

.fc-day-today .fc-daygrid-day-number {
    color: #92400e !important;
    font-weight: 700 !important;
    background: white !important;
    border-radius: 50% !important;
    width: 28px !important;
    height: 28px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 4px !important;
}

/* Tour Period Highlighting - Enhanced */
.tour-period-highlight {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%) !important;
    border-color: #ffffff !important;
}

/* Event Styling */
.fc-event {
    border-radius: 6px !important;
    border: none !important;
    padding: 2px 6px !important;
    margin: 1px !important;
    font-size: 0.75rem !important;
    font-weight: 500 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.2s ease !important;
}

.fc-event:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important;
    z-index: 10 !important;
}

.fc-event-title {
    font-weight: 600 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
}

/* Event Colors with Gradients */
.fc-event[style*="background-color: rgb(25, 135, 84)"] {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
}

.fc-event[style*="background-color: rgb(220, 53, 69)"] {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
}

.fc-event[style*="background-color: rgb(13, 110, 253)"] {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
}

.fc-event[style*="background-color: rgb(255, 193, 7)"] {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: #92400e !important;
}

.fc-event[style*="background-color: rgb(108, 117, 125)"] {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%) !important;
}

/* Background Events Styling */
.fc-bg-event {
    opacity: 0.3 !important;
    border-radius: 8px !important;
}

/* Enhanced Calendar Tooltip */
.calendar-tooltip {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    padding: 16px !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
    color: white !important;
    font-size: 13px !important;
    backdrop-filter: blur(20px) !important;
    animation: tooltipFadeIn 0.2s ease-out !important;
}

.calendar-tooltip::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 20px;
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: none;
    border-right: none;
    transform: rotate(45deg);
}

.calendar-tooltip strong {
    color: #e2e8f0 !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    display: block !important;
    margin-bottom: 8px !important;
}

.calendar-tooltip .text-light-emphasis {
    color: #cbd5e1 !important;
    line-height: 1.4 !important;
}

@keyframes tooltipFadeIn {
    0% {
        opacity: 0;
        transform: translateY(-10px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Calendar Responsiveness */
@media (max-width: 768px) {
    .fc-toolbar-title {
        font-size: 1.1rem !important;
    }
    
    .fc-button {
        padding: 4px 8px !important;
        font-size: 0.8rem !important;
    }
    
    .fc-col-header-cell {
        padding: 8px 4px !important;
        font-size: 0.7rem !important;
    }
    
    .fc-event {
        font-size: 0.7rem !important;
    }
}

/* Custom Animations for Calendar */
.fc-daygrid-day-frame {
    transition: all 0.2s ease !important;
}

.fc-event-main {
    transition: all 0.2s ease !important;
}

/* Loading State */
.fc-loading {
    position: relative !important;
}

.fc-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Custom Scrollbar for Calendar */
.fc-scroller::-webkit-scrollbar {
    width: 6px;
}

.fc-scroller::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.fc-scroller::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.fc-scroller::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ==========================================================================
   TOUR PLANNING & ROUTING STYLES
   ========================================================================== */

/* Location Marker Icon */
.location-marker-icon {
    background: none;
    border: none;
}

/* Drag and Drop Styles for Selected Locations */
.selected-location-item {
    transition: all 0.2s ease;
    border-radius: 6px;
}

.selected-location-item.drag-over {
    background: #e3f2fd !important;
    border: 2px dashed #2196F3 !important;
    transform: scale(1.02);
}

.selected-location-item[draggable="true"] {
    cursor: grab;
}

.selected-location-item[draggable="true"]:active {
    cursor: grabbing;
}

/* Route Waypoint Markers */
.route-waypoint-marker {
    background: none;
    border: none;
}

.route-waypoint {
    background: #0d6efd;
    color: white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    border: 3px solid white;
    box-shadow: 0 3px 6px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: all 0.2s ease;
}

.route-waypoint:hover {
    background: #0056b3;
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}

.waypoint-popup {
    min-width: 200px;
}

.waypoint-popup h6 {
    color: #0d6efd;
    margin-bottom: 8px;
}

/* Tour Map Cursor States */
#tourMap {
    transition: cursor 0.2s ease;
    cursor: crosshair;
}

#modalTourMap {
    transition: cursor 0.2s ease;
}

#modalTourMap.add-mode {
    cursor: default !important;
}

/* Step Guide */
.step-guide {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 4px solid #0d6efd;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
}

.step-guide .badge {
    flex-shrink: 0;
}

/* Route Waypoint Mini (for lists) */
.route-waypoint-mini {
    background: #0d6efd;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    flex-shrink: 0;
}

/* Location Card Hover Effects */
.location-card {
    transition: all 0.2s ease;
    cursor: pointer;
}

.location-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-color: var(--bs-primary) !important;
}

/* Modal Content Sizing */
.modal-fullscreen .modal-body {
    padding: 0;
}


/* Route Planning Layout */
@media (max-width: 768px) {
    .modal-fullscreen .col-md-8,
    .modal-fullscreen .col-md-4 {
        height: 50vh;
    }
    
    .route-planning-controls {
        padding-top: 1rem;
        margin-top: 1rem;
    }
}

/* Waypoint Container Styling */
.waypoint-container {
    position: relative;
}

.waypoint-header {
    background-color: #f8f9fa !important;
    border: 1px solid #e9ecef;
    position: relative;
    z-index: 2;
}

/* Route Line Visual */
.route-line {
    position: relative;
    padding-left: 2rem;
}

.route-line-visual {
    position: absolute;
    left: 1.5rem;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #0d6efd 0%, #6c757d 50%, #0d6efd 100%);
    border-radius: 2px;
}

.route-line-visual::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -6px;
    width: 15px;
    height: 15px;
    background: #0d6efd;
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.route-line-visual::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: -6px;
    width: 15px;
    height: 15px;
    background: #6c757d;
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Route Segment Content */
.route-segment-content {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    margin-left: 0.5rem;
}

/* Additional Drag and Drop Enhancements */
.selected-location-item:hover {
    background-color: #f8f9fa;
    transform: translateX(2px);
}

.selected-location-item.drag-over {
    border-left: 4px solid #0d6efd;
    background-color: rgba(13, 110, 253, 0.1);
    transform: translateX(4px);
}

.selected-location-item[draggable="true"] {
    user-select: none;
}

/* Map Cursor States */
#tourMap.drag-mode {
    cursor: grab !important;
}

/* Leaflet Routing Customization */
.location-popup {
    min-width: 180px;
}

.leaflet-routing-container {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 4px;
}

.leaflet-routing-alternatives-container {
    display: none !important;
}

/* Simple and direct approach: make all route lines semi-transparent by default */
#tour-map svg path[stroke],
#tour-map .leaflet-interactive[stroke] {
    opacity: 0.5 !important;
    stroke-opacity: 0.5 !important;
}

/* Override for main route - make it fully visible */
#tour-map .main-route-visible {
    opacity: 1 !important;
    stroke-opacity: 1 !important;
}

/* Also try targeting by z-index or layer order */
#tour-map .leaflet-overlay-pane > svg:first-child path {
    opacity: 1 !important;
    stroke-opacity: 1 !important;
}

/* Return Route Offset Styling */
.return-route-offset {
    transform: translate(3px, 3px) !important;
    transform-origin: center !important;
    opacity: 1 !important;
    stroke-opacity: 1 !important;
    stroke-dasharray: 8,4 !important;
    transition: all 0.3s ease !important;
}

/* Hover effect for return routes */
.return-route-offset:hover {
    opacity: 1 !important;
    stroke-opacity: 1 !important;
}

/* Route Legend Styles */
.route-legend-line {
    width: 24px;
    height: 3px;
    border-radius: 2px;
    display: inline-block;
}

.route-legend-main {
    background-color: #0d6efd;
    box-shadow: 0 0 0 1px rgba(13, 110, 253, 0.3);
}

.route-legend-return {
    background-color: #dc3545;
    background-image: repeating-linear-gradient(
        90deg,
        #dc3545,
        #dc3545 8px,
        transparent 8px,
        transparent 12px
    );
    box-shadow: 0 0 0 1px rgba(220, 53, 69, 0.3);
}

/* Location Row Styles */
.location-row:hover {
    background-color: rgba(13, 110, 253, 0.05) !important;
}

.location-row.table-primary {
    background-color: rgba(13, 110, 253, 0.1) !important;
}

.selected-location-item:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.selected-location-item:last-child {
    border-bottom: none !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* Selected Locations Sidebar */
.selected-locations-list {
    max-height: 400px;
    overflow-y: auto;
}

.selected-locations-list::-webkit-scrollbar {
    width: 6px;
}

.selected-locations-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.selected-locations-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.selected-locations-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.selected-locations-sidebar {
    border-left: 1px solid #e9ecef;
    padding-left: 1rem;
}

@media (max-width: 768px) {
    .selected-locations-sidebar {
        border-left: none;
        border-top: 1px solid #e9ecef;
        padding-left: 0;
        padding-top: 1rem;
        margin-top: 1rem;
    }
}


.nav-tabs {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #fff;
    border-radius: 3px;
    padding: 0 5px;
}

.nav-tabs .nav-link {
    color: #fff;
    margin-top: 5px;
    border-radius: 3px 3px 0 0;
}

/* Vertrags-Generator */

/* Contract Type Card Disabled State */
.contract-type-card.disabled-edit-mode {
    pointer-events: none;
    opacity: 0.6;
    cursor: not-allowed;
    position: relative;
}

.contract-type-card.disabled-edit-mode::after {
    content: '\F528'; /* Bootstrap Icon lock */
    font-family: "bootstrap-icons";
    position: absolute;
    top: 10px;
    right: 10px;
    color: #6c757d;
    font-size: 1.2rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.contract-page {
    width: 100%;
    max-width: 750px;
    min-height: 1000px;
    margin: 0 auto 40px auto;
    background: white;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border: 1px solid #ddd;
    position: relative;
    display: flex;
    flex-direction: column;
    page-break-after: always;
}


.contract-page:last-child {
    page-break-after: auto;
}
.contract-page-header {
    height: 60px;
    margin: 20px 40px 0 40px;
    border-bottom: 2px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #666;
}
.contract-page-content {
    flex: 1;
    padding: 20px 40px;
    overflow: hidden;
    max-height: 800px;
    min-height: 800px; padding-bottom: 80px;
}
.contract-page-footer {
    height: 60px;
    margin: 0 40px 20px 40px;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 10px;
    color: #999;
}
.page-break {
    page-break-before: always;
    break-before: page;
}

.leaflet-container a.btn-primary {
    color: #fff !important;
}
