/* Reset und Basis-Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --header-height: 70px;
    --bottom-nav-height: 60px;
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #4CAF50;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --border-radius: 8px;
    /* --touch-target-size: 44px; */
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 0.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    /* height: var(--header-height); */
    flex-shrink: 0;
    z-index: 10000;
    position: relative;
}

/* .header-left {
    flex: 0 0 auto;
} */

/* .header-left h1 {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0;
} */

/* .header-right {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 1rem;
} */

.trip-info-header {
    flex: 1;
    display: flex;
    justify-content: center;
    margin: 0 2rem;
    min-width: 0;
}

.trip-info-display {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    position: relative;
    transition: all 0.2s ease;
}

.trip-info-display.clickable {
    cursor: pointer;
}

.trip-info-display.clickable:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.edit-hint {
    display: block;
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 0.25rem;
    transition: opacity 0.2s ease;
}

.trip-info-display:hover .edit-hint {
    opacity: 1;
}

#tripNameDisplay {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.trip-dates {
    display: block;
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 400;
}

header h1 {
    font-size: 1.8rem;
    font-weight: 600;
    line-height: 1.2;
}

.header-controls {
    display: flex;
    gap: 0.5rem;
}

/* Buttons */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background-color: #4CAF50;
    color: white;
}

.btn-primary:hover {
    background-color: #45a049;
    transform: translateY(-1px);
}

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

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-outline {
    background-color: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-outline-center {
    background-color: transparent;
    color: #667eea;
    border: 2px solid #667eea;
    position: relative;
    width: 60%;
    left: 20%;
    margin-top: 5px;
}

.btn-outline-center2 {
    background-color: transparent;
    color: #667eea;
    border: 2px solid #667eea;
    position: relative;
    width: 40%;
    left: 30%;
    margin-top: 5px;
}

.btn-outline:hover {
    background-color: #667eea;
    color: white;
}

.btn-small {
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

.fixWidthBtn118 {
    width: 118px;
}

.fixWidthBtn102 {
    width: 102px;
}

.header-divider {
    margin: 0rem 1rem;
}

.icon {     /* Skaliert mit der font-size */
  height: 1.8em;
  width: auto; 
  vertical-align: middle;
}

.addMargin {
    margin-bottom: 1.5rem
}

.addMargin1 {
    margin-bottom: 1rem
}

.addMargin5 {
    margin-bottom: 0.5rem !important
}

/* Main Content */
.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    /* height: calc(100vh - var(--header-height)); */
}

#mobileDayNav {
    display: none;
}

#dayNav {
    display: block;
}

/* Bottom Navigation */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e0e0e0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    height: var(--bottom-nav-height);
    padding: 0;
}

/* .bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
} */

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0.5rem 0.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: var(--touch-target-size);
    min-width: var(--touch-target-size);
    flex: 1;
    color: #666;
    text-decoration: none;
}

.bottom-nav-item:hover,
.bottom-nav-item.active {
    color: var(--primary-color);
    background-color: rgba(102, 126, 234, 0.1);
}

.bottom-nav-item:disabled {
    color: #ccc;
    cursor: not-allowed;
}

.bottom-nav-item:disabled:hover {
    background-color: transparent;
}

.bottom-nav-icon {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.bottom-nav-label {
    font-size: 0.7rem;
    font-weight: 500;
    text-align: center;
    line-height: 1;
}

/* Mobile Menu */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    backdrop-filter: blur(4px);
}

.mobile-menu-overlay.show {
    display: flex;
    align-items: flex-start;
}

.mobile-menu {
    background: white;
    /* width: 100%; */
    max-height: 80vh;
    border-radius: 0 0 16px 16px;
    overflow: hidden;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    right: 0;
    position: fixed;
}

.mobile-menu-overlay.show .mobile-menu {
    transform: translateY(0);
}

.hiddenDesktop {
    display: none !important;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.2rem 1rem;
    border-bottom: 1px solid #e0e0e0;
    background: #f8f9fa;
}

.mobile-menu-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #333;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    color: #666;
    min-height: var(--touch-target-size);
    min-width: var(--touch-target-size);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-content {
    max-height: calc(80vh - 80px);
    overflow-y: auto;
}

.mobile-menu-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.5rem 1rem;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s ease;
    min-height: var(--touch-target-size);
    font-size: 1rem;
    color: #333;
    height: 2.6rem;
}

.mobile-menu-item:hover {
    background-color: #f8f9fa;
}

.mobile-menu-item:disabled {
    color: #ccc;
    cursor: not-allowed;
}

.mobile-menu-icon {
    font-size: 1.2rem;
    margin-right: 1rem;
    width: 1.5rem;
    text-align: center;
}

.mobile-menu-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 0rem 1rem;
}

.map-controls-tab {
    display: none;
}

/* Mobile View Management */
@media (max-width: 740px) {
    /* Default: Hide both views */
    .sidebar {
        display: none;
    }
    
    .map-container {
        display: none;
    }

    .mobile-menu-overlay.show {
        display: flex;
        align-items: flex-end;
    }

    .mobile-menu {
        border-radius: 16px 16px 0 0;
    }

    .hiddenDesktop {
        display: flex !important;
    }
    
    /* Sidebar View */
    .mobile-view-sidebar .sidebar {
        display: flex !important;
        padding: 1rem !important;
        padding-right: 0.25rem !important;
        width: 100%;
        height: 100%;
    }

    .mobile-view-sidebar .map-container {
        display: none !important;
    }

    .mobile-view-sidebar .containerMap {
        height: 0 !important;
    }

    /* Map View */
    .mobile-view-map .sidebar {
        display: none !important;
    }

    .mobile-view-map .containerMap {
        display: flex !important;
        width: 100%;
        height: 100%;
        flex-direction: column;
    }
    
    /* Diary View */
    .mobile-view-diary .sidebar {
        display: none !important;
    }

    .mobile-view-diary .map-container {
        display: none !important;
    }

    .mobile-view-diary .containerMap {
        height: 0 !important;
    }
    
    .mobile-view-map .map-container{
        flex: 1;
        height: auto;
        width: 100%;
    }
    
    /* Mobile Day Navigation for Map View */
    #mobileDayNav {
        display: block;
        width: 100%;
        margin-bottom: 0;
    }

    #dayNav {
        display: none;
    }
    
    .mobile-view-map .mobile-day-nav {
        display: flex !important;
    }
    
    .mobile-view-sidebar .mobile-day-nav {
        display: none !important;
    }
    
    /* Mobile Day Navigation Styles */
    .mobile-day-controls {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 1rem;
        width: 100%;
    }
    
    .mobile-day-controls span {
        font-weight: 600;
        min-width: 80px;
        text-align: center;
        font-size: 1rem;
    }
    
    .mobile-day-controls .btn {
        min-width: 40px;
        padding: 0.5rem;
        font-size: 0.9rem;
    }
    
    .mobile-days-list {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        border: 1px solid #e0e0e0;
        border-top: none;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        z-index: 200;
        max-height: 200px;
        overflow-y: auto;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
        gap: 0.5rem;
        padding: 1rem;
    }
    
    .mobile-days-list .day-btn {
        padding: 0.75rem 0.5rem;
        border: 1px solid #ddd;
        background: white;
        border-radius: 6px;
        cursor: pointer;
        text-align: center;
        font-size: 0.9rem;
        transition: all 0.2s ease;
    }
    
    .mobile-days-list .day-btn.active {
        background: var(--primary-color);
        color: white;
        border-color: var(--primary-color);
    }
    
    .mobile-days-list .day-btn:hover {
        background: #f0f0f0;
    }
    
    .mobile-days-list .day-btn.active:hover {
        background: var(--primary-color);
    }
}

/* Touch Optimizations */
.btn {
    /*! min-height: var(--touch-target-size); */
    /*! min-width: var(--touch-target-size); */
    /*! touch-action: manipulation; */
}

input, textarea, select {
    min-height: var(--touch-target-size);
    touch-action: manipulation;
}

/* Unsaved Changes Indicator */
.unsaved-indicator {
    color: #ffc107;
    font-size: 1.2rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* PWA Specific Styles */
@media (display-mode: standalone) {
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
    
    .bottom-nav {
        padding-bottom: env(safe-area-inset-bottom);
    }

    #mobileInstallBtn {
        display: none;
    }
}

@media (min-width: 1411px) and (max-width: 1540px) {
    .fixWidthBtn102 {
        width: auto !important;
    }
    .header-divider {
        display: none !important;
    }
}

@media screen and (min-width: 741px) and (max-width: 1410px) {
    /* Styles nur bei Breite > 740px */

    header {
        padding: 0.5rem 1rem;
    }

    .header-left h1 {
        font-size: 1.6rem;
    }

    .trip-info-header {
        margin: 0 0.5rem;
    }

    .trip-info-display {
        padding: 0.3rem 0.5rem;
    }

    /* Für alle klickbaren Elemente */
    .day-navigation:hover {
        border-color: transparent !important;
    }

    .hiddenMobil {
        display: none;
    }

    .hiddenDesktop {
        display: flex !important;
    }
    
    #tripNameDisplay {
        font-size: 1rem;
    }
    .trip-dates {
        font-size: 0.8rem;
    }
    .sidebar {
        padding-top: 0.5rem !important;
    }
    .day-navigation {
        margin-bottom: 0.5rem !important;
    }
}

/* Responsive Design */
@media (max-width: 740px) {
    .day-navigation:hover {
        border-color: transparent !important;
    }

    .day-navigation {
        border-radius: 0px !important;
    }

    .example-buttons-grid {
        grid-template-columns: repeat(1, 1fr) !important;
    }


    .main-content {
        height: calc(100vh - var(--header-height) - var(--bottom-nav-height));
        overflow: hidden;
        position: relative;
    }
    
    .bottom-nav {
        display: flex;
    }
    
    /* .header-left h1 {
        font-size: 1.2rem;
    } */
    
    .trip-info-header {
        margin: 0 0.5rem;
    }
    
    #tripNameDisplay {
        font-size: 1rem;
    }
    
    .trip-dates {
        font-size: 0.8rem;
    }

    .hiddenMobil {
        display: none;
    }
    
    .sidebar {
        width: 100% !important;
        max-width: none;
        min-width: auto;
        resize: none !important;
        padding: 1rem;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }
    
    .sidebar .day-content {
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        padding-right: 0.75rem;
    }
    
    .containerMap {
        width: 100%;
    }
    
    .map-container {
        width: 100%;
    }
    
    /* Touch-friendly buttons */
    .btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.9rem;
    }
    
    .btn-small {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    /* Larger touch targets for form elements */
    input[type="text"], 
    input[type="email"], 
    input[type="tel"], 
    input[type="date"], 
    input[type="number"],
    textarea, 
    select {
        padding: 0.75rem;
        /* font-size: 1rem; */
        border-radius: var(--border-radius);
    }

    .mobile-date-inputs input{
        padding: 0.4rem 0.2rem;
    }
    
    /* Modal adjustments */
    .modal-content {
        margin: 1rem;
        max-height: calc(100vh - 2rem);
        overflow-y: auto;
    }
    
    /* Stats modal mobile optimization */
    .stats-tabs {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .stats-tab {
        flex: 1;
        min-width: calc(50% - 0.25rem);
    }
    
    /* Day navigation mobile */
    .day-controls {
        gap: 0.5rem;
    }
    
    .day-controls .btn {
        min-width: 40px;
        padding: 0.5rem;
    }
    
    /* Transport mode selection mobile */
    .transport-mode-selection {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .transport-option {
        padding: 0.75rem;
    }
    
    /* Floating controls mobile */
    .floating-controls {
        bottom: calc(var(--bottom-nav-height) + 1rem);
        right: 1rem;
    }

    .diary-controls {
        display: none !important;
    }

    .diary-header {
        display: none !important;
    }
    
    /* Ensure map controls are visible in mobile map view */
 /*    .mobile-view-map .map-controls {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
        position: absolute;
        bottom: 1rem;
        left: 1rem;
        right: 1rem;
        z-index: 50;
        background: rgba(255, 255, 255, 0.9);
        padding: 0.5rem;
        border-radius: 8px;
        backdrop-filter: blur(4px);
    }
    
    .mobile-view-map .map-controls .btn {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
        flex: 0 0 auto;
    } */
    
    /* Hide map2 container in mobile map view */
    /* .mobile-view-map .map-container2 {
        display: none;
    } */
    
    /* Ensure main map container takes full space */
    .mobile-view-map .map-container {
        flex: 1;
        position: relative;
    }
    
    /* Show map controls in mobile map view */
    /* .mobile-view-map .map-controls {
        display: block !important;
        position: absolute;
        bottom: 1rem;
        left: 1rem;
        right: 1rem;
        z-index: 50;
        background: rgba(255, 255, 255, 0.9);
        padding: 0.5rem;
        border-radius: 8px;
        text-align: center;
    }
    
    .mobile-view-map .map-controls .btn {
        display: inline-block !important;
        font-size: 0.8rem !important;
        padding: 0.5rem 0.75rem !important;
        margin: 0.25rem !important;
    } */
    
    .floating-btn {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
    }
    
    /* Hide desktop-only elements on mobile */
    .header-controls {
        display: none;
    }
    
    /* Fixed positioning for header and bottom nav */
    header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
    }
    
    .bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1000;
    }
    
    /* Adjust main content for fixed header/nav */
    .main-content {
        margin-top: var(--header-height);
        margin-bottom: var(--bottom-nav-height);
        height: calc(100vh - var(--header-height) - var(--bottom-nav-height));
        position: relative;
    }
    
    /* Ensure proper sizing for mobile views */
    .mobile-view-sidebar .sidebar,
    .mobile-view-map .containerMap {
        /* position: absolute; */
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }
    
    /* Diary view shows modal overlay */
    .mobile-view-diary .modal {
        position: fixed !important;
        top: var(--header-height) !important;
        bottom: var(--bottom-nav-height) !important;
        left: 0 !important;
        right: 0 !important;
        margin: 0 !important;
        border-radius: 0 !important;
        height: auto !important;
        max-height: none !important;
    }
    
    .mobile-view-diary .modal-content {
        height: 100% !important;
        max-height: none !important;
        margin: 0 !important;
        border-radius: 0 !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    .mobile-view-diary .modal-body {
        flex: 1 !important;
        overflow-y: auto !important;
    }
    
    /* App lock overlay mobile */
    .app-lock-message {
        margin: 1rem;
        padding: 2rem 1.5rem;
    }
    
    .app-lock-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .app-lock-actions .btn {
        width: 100%;
        padding: 1rem;
        font-size: 1.1rem;
    }
}

@media (max-width: 365px) {
    .header-left h1 {
        font-size: 1.0rem !important;
    }
}

@media (max-width: 500px) {
    header {
        padding: 0.5rem 0.5rem;
    }

    .header-left h1 {
        font-size: 1.3rem;
    }

    .trip-info-display {
        padding: 0.3rem 0.5rem;
    }
    
    #tripNameDisplay {
        font-size: 0.9rem;
    }
    
    .trip-dates {
        font-size: 0.75rem;
    }
    
    .bottom-nav-label {
        font-size: 0.65rem;
    }
    
    .sidebar {
        padding: 0.75rem;
    }
    
    .modal-content {
        margin: 0.5rem;
        max-height: calc(100vh - 1rem);
    }
    
    .transport-mode-selection {
        grid-template-columns: 1fr;
    }
    
    .stats-tab {
        min-width: 100%;
    }
}

/* Sidebar */
.sidebar {
    width: 500px;
    min-width: 300px;
    max-width: 1000px;
    background: white;
    border-right: 1px solid #e0e0e0;
    overflow: scroll;
    padding: 1.5rem;
    padding-right: 0.5rem;
    resize: horizontal;
    display: flex;
    flex-direction: column;
}

.trip-info h2 {
    margin-bottom: 1rem;
    color: #333;
    font-size: 1.3rem;
}

.date-inputs {
    margin: 0.3rem;
}

.day-navigation {
    flex-shrink: 0;
    margin-bottom: 1rem;
}

.day-navigation h3 {
    margin-bottom: 1rem;
    color: #333;
}

#dayTitle {
    padding-bottom: 15px;
}

.day-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 1rem;
}

.day-content h3 {
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
    margin: 0 0 1rem 0;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

/* Custom scrollbar for day-content */
.day-content::-webkit-scrollbar {
    width: 6px;
}

.day-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.day-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.day-content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Firefox scrollbar */
.day-content {
    scrollbar-width: thin;
    min-height: 200px;
}

.day-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    /* margin-bottom: 1rem; */
}

.day-controls span {
    font-weight: 600;
    min-width: 80px;
    text-align: center;
}

.days-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(50px, 0.5fr));
    flex-wrap: wrap;
    gap: 0.5rem;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
    resize: vertical;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
    margin-top: 1rem;
}

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

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

.days-list::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 3px;
}

.days-list::-webkit-scrollbar-thumb:hover {
    background: #5a6fd8;
}

.days-list.collapsed {
    max-height: 0;
    margin-bottom: 0;
    opacity: 0;
    margin-top: 0;
    overflow: hidden;
}

.day-tab {
    padding: 0.3rem 0rem;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    user-select: none;
    white-space: nowrap;
    flex: 0 0 auto;
    text-align: center;
}

.day-tab[draggable="true"] {
    cursor: grab;
}

.day-tab[draggable="true"]:active {
    cursor: grabbing;
}

.day-tab.dragging {
    opacity: 0.5;
    transform: rotate(2deg) scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.day-tab.multi-day-group {
    border: 2px solid #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.day-tab.active {
    background-color: #667eea;
    color: white;
    border-color: #667eea;
}

.day-tab:hover {
    background-color: #e9ecef;
}

.day-tab.active:hover {
    background-color: #5a6fd8;
}

.day-content h3 {
    color: #333;
    font-size: 1.2rem;
}

.section {
    margin-bottom: 2rem;
}

.section h4 {
    margin-bottom: 1rem;
    color: #555;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Form Elements */
.form-input, .form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: border-color 0.2s ease;
}

.form-input-image {
    width: auto;
    padding: 0;
}

.form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.form-textarea {
    min-height: 50px;
    resize: vertical;
}

.coordinates {
    display: flex;
    gap: 0.5rem;
}

.coordinates input {
    flex: 1;
}

/* Location Input mit Suggestions */
.location-input {
    position: relative;
}

.suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.suggestion-item {
    padding: 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.suggestion-item:hover {
    background-color: #f8f9fa;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-icon {
    font-size: 1.2rem;
    min-width: 25px;
    text-align: center;
}

.suggestion-text {
    flex: 1;
    font-size: 0.9rem;
    line-height: 1.3;
}

.suggestion-type {
    font-size: 0.8rem;
    color: #666;
    background-color: #e9ecef;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-weight: 500;
}

/* Stops Container */
.stops-container {
    margin-top: 1rem;
}

.stop-item, .hotel-item, .transfer-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 0.5rem;
    cursor: move;
    transition: all 0.2s ease;
}

.stop-item.disabled, .transfer-item.disabled {
    opacity: 0.5;
    background: #f1f1f1;
    border-color: #d6d6d6;
    color: #888;
}

.stop-item.disabled:hover, .transfer-item.disabled:hover {
    background: #f1f1f1;
    border-color: #d6d6d6;
    transform: none;
    box-shadow: none;
}

.stop-item.disabled .stop-name {
    text-decoration: line-through;
    color: #999;
}

.stop-item.disabled .stop-details {
    color: #aaa;
}

.stop-item:hover, .hotel-item:hover, .transfer-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    background: #eef0f23d;
}

.stop-item.sortable-ghost, .hotel-item.sortable-ghost {
    opacity: 0.5;
}

.item-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.item-title {
    font-weight: 600;
    color: #333;
    flex: 1;
}

.item-actions {
    display: flex;
    gap: 0.3rem;
}

.item-details {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.3;
}

.item-location {
    color: #667eea;
    font-weight: 500;
}

.item-price {
    color: #28a745;
    font-weight: 600;
}

.containerMap {
    flex: 1;
    height: 100%;
    width: 100%;
    position: relative;
}

/* Map Container */
.map-container {
    z-index: 200;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
  height: 100%;
}

.map-container2 {
    z-index: -999;
    position: absolute;
    top: 0;
    left: 0;
    width: 800px;
    height: 600px;
}

#map {
    z-index: 200;
    width: 100%;
  height: 100%;
}

#map2 {
    z-index: -999;
    width: 100%;
  height: 100%;
}

.map-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 1000;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.2s ease;
}

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

.modal-content {
    display: flex;
    flex-direction: column;
    background-color: white;
    margin: 5% auto;
    padding-top: 1.5rem;
    padding-left: 2rem;
    padding-bottom: 1rem;
    padding-right: 0.7rem;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    position: relative;
    animation: slideIn 0.3s ease;
}

.marginBottom {
    margin-bottom: 0.5rem !important;
}

.form-outer {
    overflow-y: scroll;
    flex-direction: column;
    display: flex;
}

.form-inner {
    overflow-x: hidden;
    overflow-y: auto;
    flex: 1;
    padding-right: 1.3rem;
    scrollbar-width: thin;
    min-height: 100px;
}

.stats-modal {
    max-width: 900px;
    max-height: 80vh;
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
    transition: color 0.2s ease;
}

.close:hover {
    color: #333;
}

.modal-content h3 {
    margin-bottom: 1.5rem;
    color: #333;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
}

.form-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 0.5rem;
    padding-top: 1rem;
    margin-right: 1.3rem;
    border-top: 1px solid #e0e0e0;
}

/* Karten-Kontextmenü */
.map-context-menu {
    position: absolute;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    min-width: 180px;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.context-menu-item {
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #333;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.context-menu-item:last-child {
    border-bottom: none;
}

.context-menu-item:hover {
    background-color: #f8f9fa;
    color: #667eea;
}

.context-menu-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* Stop-Marker Styling */
.custom-stop-marker {
    background: transparent !important;
    border: none !important;
}

.stop-marker-container {
    position: relative;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stop-number {
    position: absolute;
    top: -1px;
    left: -1px;
    background: #667eea;
    color: white;
    border-radius: 50%;
    width: 15px;
    height: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 10px;
    border: 1px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    z-index: 2;
}

.stop-category-icon {
    background: white;
    border: 2px solid #667eea;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.start-category-combined {
    background: green;
    border: 2px solid green;
    border-radius: 30%;
    width: 28px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
    position: relative;
}

.end-category-combined {
    background: red;
    border: 2px solid red;
    border-radius: 30%;
    width: 28px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
    position: relative;
}

.stop-category-combined {
    background: white;
    border-radius: 50%;
    width: 27px;
    height: 27px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    position: relative;
}

.counter-combined {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #ff6b6b;
    color: white;
    border-radius: 50%;
    width: 13px;
    height: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
}

/* Popup-Styling */
.popup-category {
    color: #667eea;
    font-weight: 500;
    font-size: 13px;
}

.popup-buttons {
    margin-top: 8px;
    display: flex;
    gap: 5px;
    justify-content: center;
}

.popup-btn {
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 70px;
}

.popup-btn-edit {
    background-color: #3498db;
    color: white;
}

.popup-btn-edit:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
}

.popup-btn-delete {
    background-color: #e74c3c;
    color: white;
}

.popup-btn-delete:hover {
    background-color: #c0392b;
    transform: translateY(-1px);
}

/* Sterne-Bewertung */
.star-rating {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-top: 5px;
}

.star {
    cursor: pointer;
    font-size: 20px;
    transition: all 0.2s ease;
    opacity: 0.3;
}

.star:hover,
.star.active {
    opacity: 1;
    transform: scale(1.1);
}

.star.active {
    filter: drop-shadow(0 0 3px #ffd700);
}

.star-text {
    margin-left: 10px;
    font-size: 14px;
    color: #666;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 740px) {
    .main-content {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: 50vh;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }
    
    .map-container {
        height: 50vh;
    }

    /* .map-container2 {
        height: 50vh;
    } */
    
    .header-controls {
        flex-direction: column;
        gap: 0.3rem;
    }
    
    .date-inputs {
        flex-direction: column;
    }
    
    .coordinates {
        flex-direction: column;
    }

    .prompt-examples {
        display: none;
    }
}

/* Drag and Drop Styles */
.sortable-chosen {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.sortable-drag {
    opacity: 0.8;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

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

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Multi-Day Hotel Styling */
.hotel-item.multi-day {
    border-left: 4px solid #667eea;
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.1) 0%, rgba(248, 249, 250, 1) 10%);
}

.hotel-item.multi-day-continuation {
    border-left: 4px solid #95a5ea;
    background: linear-gradient(90deg, rgba(149, 165, 234, 0.1) 0%, rgba(248, 249, 250, 1) 10%);
}

/* Edit Button Styling */
.btn-edit {
    background-color: #17a2b8;
    color: white;
    border: none;
}

.btn-edit:hover {
    background-color: #138496;
}

.hotel-marker {
    font-size: 20px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* Richtungspfeile */
.direction-arrow {
    pointer-events: none;
    z-index: 1000;
}

.direction-arrow div {
    text-shadow: 1px 1px 2px rgba(255,255,255,0.8);
    filter: drop-shadow(0 0 2px rgba(0,0,0,0.5));
}

/* Vortags-Hotel Marker */
.previous-hotel-marker {
    z-index: 999;
}

/* Start-/End-Marker */
.start-marker, .end-marker {
    z-index: 1001;
}

.start-marker-full, .end-marker-full {
    z-index: 1002;
}

.start-marker-full div, .end-marker-full div {
    box-shadow: 0 2px 8px rgba(0,0,0,0.4) !important;
}

/* Route Info Styles */
.leaflet-popup-content {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.4;
}

.leaflet-popup-content b {
    color: #333;
    font-size: 1.1em;
}

/* Map Controls Enhancement */
.map-controls {
    background: rgba(255, 255, 255, 0.9);
    padding: 0.5rem;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.map-controls .btn {
    margin-bottom: 0.3rem;
    width: 100%;
    font-size: 0.8rem;
}

.map-controls .btn:last-child {
    margin-bottom: 0;
}

/* Custom Scrollbar */
.sidebar::-webkit-scrollbar {
    width: 0px;
}

.sidebar::-webkit-scrollbar-track {
    background: white;
}

.sidebar::-webkit-scrollbar-thumb {
    background: white;
    border-radius: 0px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: white;
}

.form-outer::-webkit-scrollbar {
    width: 0px;
}

.form-outer::-webkit-scrollbar-track {
    background: white;
}

.form-outer::-webkit-scrollbar-thumb {
    background: white;
    border-radius: 0px;
}

.form-outer::-webkit-scrollbar-thumb:hover {
    background: white;
}

/* Statistiken Styles */
.stats-tabs {
    display: flex;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 1.5rem;
    margin-right: 1.3rem;
}

.stats-tab {
    padding: 0.75rem 1.5rem;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
}

.stats-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background-color: rgba(102, 126, 234, 0.1);
}

.stats-tab:hover {
    background-color: #f8f9fa;
}

.stats-tab-content {
    display: none;
}

.stats-tab-content.active {
    display: block;
}

.stats-controls {
    margin-bottom: 1rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 6px;
}

.stats-controls label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    cursor: pointer;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.stats-table th,
.stats-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.stats-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.stats-table tr:hover {
    background-color: #f8f9fa;
}

.stats-table .number {
    text-align: right;
    font-family: 'Courier New', monospace;
}

.stats-table .total-row {
    background-color: #667eea;
    color: white;
    font-weight: 600;
}

.stats-table .total-row:hover {
    background-color: #5a6fd8;
}

.costs-section {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.costs-section:last-child {
    border-bottom: none;
}

.costs-section h4 {
    margin-bottom: 1rem;
    color: #333;
}

.cost-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.cost-item:last-child {
    border-bottom: none;
}

.cost-description {
    flex: 1;
}

.cost-amount {
    font-weight: 600;
    color: #e74c3c;
}

.cost-category {
    font-size: 0.8rem;
    color: #666;
    margin-left: 0.5rem;
}

.stats-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

.day-color-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.5rem;
}

.route-segment {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Responsive Statistiken */
@media (max-width: 740px) {
    .stats-modal {
        width: 95%;
        max-width: none;
        margin: 2% auto;
    }
    
    .stats-tabs {
        flex-direction: column;
    }
    
    .stats-tab {
        text-align: center;
    }
    
    .stats-table {
        font-size: 0.8rem;
    }
    
    .stats-table th,
    .stats-table td {
        padding: 0.5rem 0.25rem;
    }
}

/* Route Point Display Styling */
.route-point-display {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.route-point-display:hover {
    background: #e9ecef;
    border-color: #667eea;
}

.route-point-info {
    flex: 1;
}

.route-point-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.route-point-coords {
    font-size: 0.85rem;
    color: #6c757d;
    font-family: 'Courier New', monospace;
}

.route-point-display .edit-btn {
    margin-left: 1rem;
    flex-shrink: 0;
}

.empty-state {
    text-align: center;
    padding: 1rem 0;
}

.empty-state .btn {
    margin-bottom: 0.5rem;
}

/* Print Modal Styling */
 .print-map-option-outer {
    padding-top: 10px;
}

.print-map-option {
    padding-top: 5px;
    padding-left: 5px;
}

/* Print Processing Overlay */
.print-processing-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.print-processing-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
}

.print-spinner {
    margin-bottom: 1.5rem;
}

.map-size-header {
    margin-top: 5px;
    margin-left: 5px;
}

.map-size-radio {
    margin-left: 5px;
    white-space: nowrap;
}

.map-size-selection {
    margin-top: 3px;
    margin-left: 10px;
    text-indent: -5px;
}



.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#printProcessingTitle {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

#printProcessingMessage {
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.print-progress {
    margin-bottom: 1rem;
}

.print-progress-bar {
    width: 100%;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.print-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
}

.print-progress-text {
    font-size: 0.9rem;
    color: #667eea;
    font-weight: 600;
}

.print-processing-details {
    margin-top: 1rem;
}

#printProcessingDetails {
    color: #888;
    font-size: 0.85rem;
    font-style: italic;
}

.item-container {
    display: grid;
    grid-template-columns: 2em 1fr;  /* Feste Breite statt auto */
    align-items: flex-start;
    margin-bottom: 0.2em;
}

.item-icon {
    grid-column: 1;
    text-align: center;              /* Zentriert alle Icons/Buchstaben */
    line-height: 1.2;
    min-width: 1.5em;               /* Mindestbreite für Konsistenz */
}

.item-text {
    grid-column: 2;
    word-wrap: break-word;
}



/* Print Styles */
@media print {
    body * {
        visibility: hidden;
    }
    
    .print-content, .print-content * {
        visibility: visible;
    }
    
    .print-content {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        background: white;
        color: black;
        font-family: Arial, sans-serif;
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .print-header {
        border-bottom: 2px solid #333;
        padding-bottom: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .print-title {
        font-size: 18pt;
        font-weight: bold;
        margin-bottom: 0.5rem;
    }
    
    .print-subtitle {
        font-size: 14pt;
        color: #666;
    }
    
    .print-section {
        margin-bottom: 1.5rem;
        page-break-inside: avoid;
    }
    
    .print-section-title {
        font-size: 14pt;
        font-weight: bold;
        margin-bottom: 0.5rem;
        border-bottom: 1px solid #ccc;
        padding-bottom: 0.25rem;
    }
    
    .print-day {
        margin-bottom: 2rem;
        page-break-inside: avoid;
    }
    
    .print-day-title {
        font-size: 16pt;
        font-weight: bold;
        margin-bottom: 1rem;
        background: #f0f0f0;
        padding: 0.5rem;
    }
    
    .print-item {
        margin-bottom: 0.75rem;
        padding-left: 1rem;
    }
    
    .print-item-title {
        font-weight: bold;
        margin-bottom: 0.25rem;
    }
    
    .print-item-details {
        margin-left: 1rem;
        font-size: 11pt;
        color: #555;
    }

    .print-item-title2 {
        font-weight: bold;
        margin-bottom: 0.25rem;
        margin-left: 1rem;
    }
    
    .print-item-details2 {
        margin-left: 2rem;
        font-size: 11pt;
        color: #555;
    }
    
    .print-coordinates {
        font-family: monospace;
        font-size: 10pt;
        color: #666;
    }
    
    .print-cost {
        font-weight: bold;
        color: #2c5530;
    }
    
    .print-time {
        font-style: italic;
        color: #666;
    }
    
    .print-page-break {
        page-break-before: always;
    }
    
    .print-map-container {
        margin: 1rem 0;
        text-align: center;
        page-break-inside: avoid;
    }
    
    .print-map-image {
        max-width: 100%;
        height: auto;
        border: 1px solid #ccc;
        border-radius: 4px;
    }
    
    .print-marker {
        z-index: 1000;
    }
}

/* Tag ohne Hotel Styling */
.day-item.no-hotel,
.day-tab.no-hotel {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
}

.day-item.no-hotel:hover,
.day-tab.no-hotel:hover {
    background: linear-gradient(135deg, #ff5252 0%, #e53935 100%);
}

/* Hotel-Warnung */
.hotel-warning, .start-warning, .dest-warning, .time-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 8px 12px;
    margin-bottom: 8px;
    color: #856404;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hotel-warning::before, .start-warning::before, .dest-warning::before, .time-warning::before {
    content: "⚠️";
    font-size: 16px;
}

/* Flexible Day-Navigation */
.day-navigation {
    position: relative;
    overflow: auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.8rem;
    background: #fafafa;
    transition: border-color 0.2s ease;
    margin-right: 1rem;
}

.day-navigation:hover {
    border-color: #667eea;
}

.day-navigation:hover::after {
    opacity: 1;
}

/* App-Sperrung für nicht initialisierte Reisen */
.app-locked {
    position: relative;
}

.app-locked .main-content {
    opacity: 0.3;
    pointer-events: none;
    filter: grayscale(100%);
    transition: all 0.3s ease;
}

/* Modals sollen nicht von der App-Sperrung betroffen sein */
.modal {
    z-index: 10000 !important;
    opacity: 1 !important;
    filter: none !important;
    pointer-events: auto !important;
}

.app-locked .trip-info-display {
    opacity: 0.5;
    pointer-events: none;
}

.app-locked .header-controls .btn:not(.btn-allowed) {
    opacity: 0.3;
    pointer-events: none;
    cursor: not-allowed;
}

.app-locked .header-controls .btn.btn-allowed {
    opacity: 1;
    pointer-events: auto;
    cursor: pointer;
}

.app-lock-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(2px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transition: opacity 0.3s ease;
}

.app-lock-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.app-lock-message {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 500px;
    margin: 0 1rem;
}

.app-lock-message h2 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.app-lock-message p {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.app-lock-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.app-lock-actions .btn {
    min-width: 120px;
    height: 2.5rem;
}

.app-lock-actions .aiBtn {
    min-width: 0;
}


/* Modals sollen nicht von der App-Sperrung betroffen sein */
.modal {
    z-index: 10000 !important;
    opacity: 1 !important;
    filter: none !important;
    pointer-events: auto !important;
}

.modal .modal-content {
    opacity: 1 !important;
    filter: none !important;
    pointer-events: auto !important;
}

/* Speichern/Laden Optionen */
.save-options, .load-options, .print-option-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.save-option-btn, .load-option-btn, .print-option-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
    text-align: left;
    min-height: 80px;
    justify-content: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.save-option-btn:hover, .load-option-btn:hover, .print-option-btn:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.save-option-btn small, .load-option-btn small, .print-option-btn small {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    opacity: 0.8;
    font-weight: normal;
}

/* Erfolgs- und Fehlermeldungen */
.error-message {
    background-color: #fee;
    color: #c33;
    padding: 0.75rem;
    border-radius: 4px;
    border: 1px solid #fcc;
    margin-top: 0.5rem;
}

.success-message {
    background-color: #efe;
    color: #363;
    padding: 0.75rem;
    border-radius: 4px;
    border: 1px solid #cfc;
    margin-top: 0.5rem;
}

/* Konflikt-Details */
.conflict-details {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 1rem;
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* Danger Button */
.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
    transform: translateY(-1px);
}

/* Success Button */
.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #218838;
    transform: translateY(-1px);
}

/* Form Validierung */
input:invalid {
    border-color: #dc3545;
}

input:valid {
    border-color: #28a745;
}

/* Loading State */
.btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
    position: relative;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Image Source Selection Styles */

.source-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.source-tab {
    flex: 1;
    padding: 0.25rem 0.25rem;
    border: 1px solid #ddd;
    background: #f8f9fa;
    color: #495057;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    text-align: center;
}

.source-tab:hover {
    background: #e9ecef;
    border-color: #6e64c6;
}

.source-tab.active {
    background: #6e64c6;
    color: white;
    border-color: #6e64c6;
}

.source-tab.active:hover {
    background: #5a52b8;
}

.iconOnly {
    font-size: 1.3rem;
    padding: 0rem 1rem;
}


/* AI Assistant Styles */
.btn-ai-assistant {
    background: #6c757d;
    color: white;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    transform: translateY(0px);
}

.btn-ai-assistant::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: conic-gradient(
    from 0deg,
    red,
    orange,
    yellow,
    lime,
    cyan,
    blue,
    magenta,
    red
  );
    
    background-size: 400% 400%;
    border-radius: inherit;
    z-index: -1;
    background-position: 50% 50%;
    
    animation: aiButtonGlow 30s ease-in-out infinite;
    animation: aiBorderSpin 3s linear infinite;
}

@keyframes aiBorderSpin {
  to {
    transform: rotate(1turn);
  }
}

.btn-ai-assistant:hover {
    background: #5a6268 !important;
    z-index: 12;
    transform: translateY(0px);
    animation: none;
}

@keyframes aiButtonGlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Variante 1: RGB Border Animation */
.btn-ai-variant-1 {
    background: #6c757d;
    color: #333;
    border: 1px solid transparent;
    background-clip: padding-box;
    position: relative;
    font-weight: 600;
    transition: all 0.3s ease;
    color: #00ff88;
    text-shadow: 0 0 1px #0f8;
    padding: 0.2rem 0.5rem;
    padding-bottom: 0;
    width: 4.5rem;
}

.btn-ai-variant-1::before {
    content: '';
  position: absolute;
  inset: 0;
  padding: 1px;              /* Randstärke */
  border-radius: inherit;
  background:
    linear-gradient(45deg,
      #9400d3, #f00, #ff7f00, #ff0, #0f0, #00f, #4b0082, #9400d3,
      #f00, #ff7f00, #ff0, #0f0, #00f, #4b0082, #9400d3);
  background-size: 400% 400%;
  animation: rgbBorderRotate 10s linear infinite;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
}

@keyframes rgbBorderRotate {
    0% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.btn-ai-variant-1:hover {
    /* transform: translateY(-2px); */
    /* box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); */
    background-color: #5a6268;
}


.ai-assistant-modal {
    max-width: 1200px;
    max-height: 80vh;
    width: 90%;
    margin: 2rem auto;
}

/* Kompakte AI-Settings */
.ai-settings-header {
    margin-bottom: 1rem;
}

.settings-toggle-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.settings-toggle-btn:hover {
    background: #e9ecef;
    border-color: #6e64c6;
}

.settings-icon {
    font-size: 1rem;
}

.settings-text {
    flex: 1;
    text-align: left;
    margin-left: 0.5rem;
    font-weight: 500;
    color: #495057;
}

.settings-arrow {
    font-size: 0.8rem;
    color: #6c757d;
    transition: transform 0.3s ease;
}

.settings-arrow.open {
    transform: rotate(180deg);
}

.ai-settings {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid #dee2e6;
}

.ai-setting-compact {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ai-setting-compact label {
    font-weight: 500;
    color: #495057;
    margin: 0;
    min-width: 60px;
    font-size: 0.85rem;
}

.form-input-small {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 0.85rem;
    background: white;
}

/* Toggle Gruppe mit Header */
.ai-toggle-group {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: white;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.ai-toggle-group:last-child {
    margin-bottom: 0;
}

.ai-toggle-group-header {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ai-toggles-row {
    display: flex;
    gap: 1.5rem;
    justify-content: space-around;
    margin-bottom: 0.5rem;
}

.ai-toggles-row:last-child {
    margin-bottom: 0;
}

.paddingB {
    padding-bottom: 0.3rem;
    justify-content: space-between;
}

.ai-toggle-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ai-toggle-item label {
    font-weight: 500;
    color: #495057;
    margin: 0;
    font-size: 0.8rem;
    white-space: nowrap;
}

/* Kleine Toggle Switches */
.toggle-switch-small {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
}

.toggle-switch-small input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-label-small {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 20px;
}

.toggle-label-small:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

.toggle-switch-small input:checked + .toggle-label-small {
    background-color: #6e64c6;
}

.toggle-switch-small input:checked + .toggle-label-small:before {
    transform: translateX(16px);
}

/* Disabled Toggle Switch */
.toggle-switch-small input:disabled + .toggle-label-small {
    background-color: #e0e0e0;
    cursor: not-allowed;
    opacity: 0.6;
}

.toggle-switch-small input:disabled:checked + .toggle-label-small {
    background-color: #b0b0b0;
}

.ai-toggle-item.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.ai-setting-row {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

.ai-setting-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ai-setting-group label {
    font-weight: 500;
    color: #495057;
    margin: 0;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 24px;
}

.toggle-label:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-label {
    background-color: #667eea;
}

.toggle-switch input:checked + .toggle-label:before {
    transform: translateX(26px);
}

/* Inline Prompt Examples (im Chat) */
.prompt-examples-initial {
    margin: 1.5rem 0 1rem 0.5rem;
    padding: 1rem;
    background: rgba(110, 100, 198, 0.05);
    border-radius: 12px;
    border: 1px dashed rgba(110, 100, 198, 0.2);
}

.prompt-examples-initial h4 {
    margin: 0 0 0.75rem 0;
    color: #6e64c6;
    font-size: 0.9rem;
    font-weight: 600;
}

.example-buttons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
    grid-template-columns: repeat(2, 1fr);
}

.example-btn-inline {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    background: white;
    color: #495057;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.example-btn-inline:hover {
    background: #6e64c6;
    color: white;
    border-color: #6e64c6;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(110, 100, 198, 0.2);
}

/* Chat Interface */
.ai-chat-container {
    display: flex;
    flex-direction: column;
    min-height: 400px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
}

.ai-chat-history {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    padding-left: 0.5rem;
    background: white;
}

.ai-model {
    padding-left: 0.5rem;
}

.ai-message {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    animation: fadeIn 0.3s ease-in;
}

.ai-message.ai-user {
    flex-direction: row-reverse;
}

.ai-message.ai-user .message-content {
    background: #667eea;
    color: white;
    margin-right: 0;
    margin-left: 0;
    overflow: auto;
}

.ai-message.ai-model .message-content {
    background: #f8f9fa;
    margin-right: 2rem;
    margin-left: 0;
    overflow: auto;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.ai-user .message-avatar {
    background: #667eea;
    color: white;
}

.message-content {
    flex: 1;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    line-height: 1.4;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    cursor: text;
}

.retry-btn {
    font-size: 2rem !important;
    line-height: 1rem;
    margin: auto;
    display: block;
    padding-bottom: 0.5rem !important;
}

/* AI Message Action Buttons */
.ai-message-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.ai-message:hover .ai-message-actions {
    opacity: 1;
}

.ai-action-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    color: #6c757d;
}

.ai-action-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    transform: scale(1.1);
}

.ai-action-btn:active {
    transform: scale(0.95);
}

/* Mobile Anpassungen für Action Buttons */
@media (max-width: 740px) {
    /* .ai-message-actions {
        opacity: 1;
    } */

    .ai-action-btn {
        padding: 0.1rem 0rem;
    }

    .ai-message.ai-model .message-content {
        margin-right: 0;
    }
    
}

.message-content p {
    margin: 0 0 0.5rem 0;
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

.message-content p:last-child {
    margin-bottom: 0;
}

.message-content ul {
    margin: 0.5rem 0;
    padding-left: 1.2rem;
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

.message-content li {
    margin-bottom: 0.25rem;
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

/* JSON Response Styling */
.json-response {
    background: #f1f3f4;
    border: 1px solid #dadce0;
    border-radius: 8px;
    padding: 1rem;
    margin: 0.5rem 0;
    position: relative;
}

.json-response-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #1a73e8;
}

.json-preview {
    background: #2d3748;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85rem;
    overflow-x: auto;
    max-height: 200px;
    overflow-y: auto;
}

.json-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

/* Input Area */
.ai-input-area {
    border-top: 1px solid #dee2e6;
    background: #f8f9fa;
    padding: 1rem;
}

.ai-prompt-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ai-prompt-input {
    width: 100%;
    min-height: 60px;
    padding: 0.75rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.ai-prompt-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.ai-input-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.ai-close-btn {
    display: block;
    margin-right: auto;
}

/* Loading State */
.ai-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: rgba(248, 249, 250, 0.9);
    border-top: 1px solid #dee2e6;
}

.ai-loading p {
    margin-top: 1rem;
    color: #6c757d;
    font-style: italic;
}

/* Markdown Styling in Chat Messages */
.message-content h1, .message-content h2, .message-content h3 {
    margin: 1rem 0 0.5rem 0;
    color: #2c3e50;
    font-weight: 600;
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

.message-content h1 { font-size: 1.3rem; }
.message-content h2 { font-size: 1.2rem; }
.message-content h3 { font-size: 1.1rem; }

.message-content strong {
    font-weight: 600;
    color: #2c3e50;
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

.message-content em {
    font-style: italic;
    color: #495057;
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

.message-content code {
    background: #f1f3f4;
    color: #e83e8c;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85rem;
    border: 1px solid #dee2e6;
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

.message-content pre {
    background: #2d3748;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    overflow-x: auto;
    border-left: 4px solid #667eea;
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

.message-content pre code {
    background: transparent;
    color: inherit;
    border: none;
    padding: 0;
    font-size: 0.9rem;
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

.message-content ul, .message-content ol {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.message-content li {
    margin: 0.25rem 0;
    line-height: 1.4;
}

.message-content a {
    color: #667eea;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

.message-content a:hover {
    border-bottom-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    padding: 2px 4px;
    border-radius: 3px;
    margin: -2px -4px;
}

.message-content p {
    margin: 0.5rem 0;
    line-height: 1.5;
}

.message-content p:first-child {
    margin-top: 0;
}

.message-content p:last-child {
    margin-bottom: 0;
}

/* Streaming Animations */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
}

.typing-indicator span {
    height: 8px;
    width: 8px;
    background: #6c757d;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator span:nth-child(2) { animation-delay: -0.16s; }
.typing-indicator span:nth-child(3) { animation-delay: 0; }

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.typing-cursor {
    color: #667eea;
    font-weight: bold;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.streaming-content {
    position: relative;
}

.streaming-content p {
    margin: 0;
    line-height: 1.5;
    word-wrap: break-word;
}

/* Error Message Styling */

.message-content.error-message {
    background: #f8d7da !important;
    color: #721c24 !important;
    border-left: 4px solid #dc3545;
}

/* Improved Animation Performance */
.ai-message {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Smooth Scrolling für Chat */
.ai-chat-history {
    scroll-behavior: smooth;
}

/* Loading State Improvements */
.ai-loading {
    background: rgba(248, 249, 250, 0.95);
    backdrop-filter: blur(2px);
}

.ai-loading .loading-spinner .spinner {
    border-color: #667eea;
    border-top-color: transparent;
}

/* Responsive Design */
@media (max-width: 740px) {
    .ai-assistant-modal {
        width: calc(100% - 1rem);
        max-height: 90vh;
        padding-left: 1.3rem;
        padding-right: 0rem;
    }
    
    .ai-setting-row {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .ai-setting-group {
        justify-content: space-between;
    }
    
    .example-buttons {
        flex-direction: column;
    }
    
    .ai-chat-container {
        min-height: 300px;
    }
    
    .typing-indicator {
        padding: 6px 10px;
    }
    
    .typing-indicator span {
        height: 6px;
        width: 6px;
    }
    
    /* Mobile Anpassungen für Toggle-Gruppen */
    .ai-toggle-group {
        padding: 0.5rem;
    }
    
    .ai-toggle-group-header {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
        padding-bottom: 0.4rem;
    }
    
    .ai-toggles-row {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }
    
    .ai-toggle-item {
        justify-content: space-between;
        padding: 0.25rem 0;
    }
    
    .ai-toggle-item label {
        font-size: 0.85rem;
    }
}

.gradient-spinner {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        transparent 270deg,
        #3498db 360deg
    );
    animation: rotate 1.2s linear infinite;
    position: relative;
}

.gradient-spinner::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 25px;
    height: 25px;
    background: white;
    border-radius: 50%;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.ai-thinking {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.orbit-spinner {
    width: 50px;
    height: 50px;
    position: relative;
}

.orbit-spinner::before,
.orbit-spinner::after {
    content: '';
    position: absolute;
    border-radius: 50%;
}

.orbit-spinner::before {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(52, 152, 219, 0.2);
}

.orbit-spinner::after {
    width: 10px;
    height: 10px;
    background: #3498db;
    top: 0;
    left: 20px;
    animation: orbit 1s linear infinite;
}

@keyframes orbit {
    0% { transform: rotate(0deg) translateX(20px); }
    100% { transform: rotate(360deg) translateX(20px); }
}

.ai-text {
    color: #555;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    animation: fade 2.5s ease-in-out infinite;
}

@keyframes fade {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Moderne Code-Eingabe */
.code-input-section {
    padding: 1rem 0;
}

.input-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.input-header h3 {
    color: #667eea;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.input-description {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
}

.modern-input-group {
    margin-bottom: 1.25rem;
}

.modern-label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.modern-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: all 0.3s ease;
    background: #fafbfc;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.modern-input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1), 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.modern-input::placeholder {
    color: #9ca3af;
    font-style: italic;
}

.modern-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.modern-actions .btn {
    min-width: 140px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.modern-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/* Ansichten-Wechsel Animation */
/* #loadOptionsView, #loadCodeView {
    transition: all 0.3s ease;
} */
/* 
#loadCodeView.show {
    animation: slideInFromRight 0.3s ease;
}

#loadOptionsView.hide {
    animation: slideOutToLeft 0.3s ease;
} */

/* @keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutToLeft {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-20px);
    }
}
 */
/* Responsive Design für Code-Eingabe */
@media (max-width: 740px) {
    .modern-input {
        font-size: 1rem;
        padding: 0.875rem 1rem;
    }
    
    .input-header h3 {
        font-size: 1.25rem;
    }
    
    .modern-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .modern-actions .btn {
        min-width: auto;
        width: 100%;
    }
}

@keyframes inner-pulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.8;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 1;
  }
}

@keyframes outer-pulse {
  0% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0;
  }
}

.pulse-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.pulse-container::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  transform: translate(-50%, -50%);
  background: rgba(255, 0, 0, 0.3);
  border-radius: 50%;
  animation: inner-pulse 2s ease-in-out infinite;
  z-index: -1; /* Hinter dem Marker */
}

.pulse-container::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 150%;
  height: 150%;
  transform: translate(-50%, -50%);
  border: 3px solid rgba(255, 0, 0, 0.8);
  border-radius: 50%;
  animation: outer-pulse 2s ease-in-out infinite;
  z-index: -2; /* Hinter dem Marker */
}


/* Ungespeicherte Änderungen Indikator */
.unsaved-indicator {
    display: inline-block;
    color: #ff6b6b;
    font-size: 1.2rem;
    animation: pulse-glow 2s ease-in-out infinite;
    text-shadow: 0 0 4px rgba(255, 107, 107, 0.5);
    vertical-align: middle;
}

@keyframes pulse-glow {
    0%, 100% {
        opacity: 0.7;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

/* Tooltip für ungespeicherte Änderungen */
.unsaved-indicator::after {
    content: 'Ungespeicherte Änderungen';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
    margin-bottom: 0.5rem;
}

.unsaved-indicator::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
    margin-bottom: 0.1rem;
}

#saveTripBtn:hover .unsaved-indicator::after,
#saveTripBtn:hover .unsaved-indicator::before {
    opacity: 1;
}

/* Speichern-Button mit ungespeicherten Änderungen */
#saveTripBtn.has-unsaved-changes {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

#saveTripBtn.has-unsaved-changes:hover {
    background: linear-gradient(135deg, #ff5252 0%, #e53e3e 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

/* Tagebuch-Ansicht */
.diary-container {
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 10px solid rgba(100,0,0,0.7);
}

.diary-header {
    background: rgba(100,0,0,0.7);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.diary-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.diary-controls {
    display: flex;
    gap: 0.5rem;
}

/* Wetter-Sektion */
.diary-weather-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    margin: 1rem auto;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
    transition: all 0.3s ease;
    width: fit-content;
}

/* Kompakte Wetter-Anzeige */
.weather-display {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.25rem 0;
    transition: all 0.3s ease;
}

.weather-display:hover {
    opacity: 0.9;
}

.weather-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.weather-text {
    color: white;
    font-size: 1rem;
    font-weight: 500;
    flex: 1;
}

.weather-edit-icon {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.weather-display:hover .weather-edit-icon {
    color: white;
    transform: scale(1.1);
}

/* Wetter-Controls (eingeklappt versteckt) */
.weather-controls {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.4s ease;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.diary-weather-section.collapsed .weather-display {
    display: flex;
}

.diary-weather-section.collapsed .weather-controls {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
}

.diary-weather-section.expanded .weather-display {
    margin-bottom: 1rem;
}

.diary-weather-section.expanded .weather-controls {
    max-height: 500px;
    opacity: 1;
    margin-top: 0.5rem;
}

.weather-control-group {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.weather-control-group label {
    color: white;
    font-weight: 500;
    font-size: 0.9rem;
}

.weather-select {
    padding: 0.65rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-size: 0.95rem;
    background: white;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
}

.weather-select:hover {
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.weather-select:focus {
    outline: none;
    border-color: white;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.weather-select option {
    padding: 0.5rem;
}

.diary-controls .btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
}

.diary-controls .btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.diary-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.diary-section {
    margin-bottom: 2rem;
}

.diary-section h3 {
    color: #333;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: 600;
    border-bottom: 2px solid #667eea;
    padding-bottom: 0.5rem;
}

.diary-textarea {
    width: 100%;
    min-height: 120px;
    padding: 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.diary-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.diary-textarea::placeholder {
    color: #9ca3af;
    font-style: italic;
}

.diary-stops-section {
    margin-top: 2rem;
}

.diary-stops-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.diary-stop-entry {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.3s ease;
}

.diary-stop-entry:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.diary-stop-entry.collapsed {
    padding: 0.75rem 1rem;
    cursor: pointer;
}

.diary-stop-entry.expanded {
    padding: 1.5rem;
    cursor: default;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
    border-color: #667eea;
}

.diary-stop-header {
    display: flex;
    flex-direction: column;
}

.diary-stop-entry.collapsed .diary-stop-header {
    margin-bottom: 0;
}

.diary-stop-entry.expanded .diary-stop-header {
    margin-bottom: 1rem;
}

/* Erste Zeile: Icon + Name + Edit-Button */
.diary-stop-title-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}

.diary-stop-title-row .diary-stop-name {
    flex: 1;
    min-width: 0;
}

.diary-stop-title-row .diary-edit-btn {
    margin-left: auto;
    flex-shrink: 0;
}

.diary-stop-icon {
    font-size: 1.5rem;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.diary-stop-name {
    font-weight: 600;
    color: #333;
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* Preview-Bereich */
.diary-preview {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    width: 100%;
    padding-left: 3rem; /* Einrückung für Ausrichtung unter dem Text */
}

.diary-stop-entry.expanded .diary-preview,
.diary-transfer-entry.expanded .diary-preview {
    display: none;
}

.preview-text {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.5;
    flex: 1;
    min-width: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.preview-images-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.preview-images-btn:hover {
    background: #5568d3;
    transform: scale(1.05);
}

/* Edit-Button */
.diary-edit-btn {
    background: none;
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.diary-edit-btn:hover {
    background: lightgray;
    transform: scale(1.05);
}

/* Content-Bereich (eingeklappt versteckt) */
.diary-stop-content,
.diary-transfer-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

.diary-stop-entry.expanded .diary-stop-content,
.diary-transfer-entry.expanded .diary-transfer-content {
    max-height: 1000px;
    opacity: 1;
    margin-top: 1rem;
}

.diary-stop-textarea {
    width: 100%;
    min-height: 80px;
    padding: 0.75rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.95rem;
    line-height: 1.4;
    resize: vertical;
    transition: border-color 0.3s ease;
    margin-bottom: 0.75rem;
}

.diary-stop-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.diary-stop-textarea::placeholder {
    color: #adb5bd;
    font-style: italic;
}
/* Transfer-Einträge im Tagebuch */
.diary-transfer-entry {
    background: #f0f8ff;
    border: 1px solid #b0d4f1;
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.3s ease;
}

.diary-transfer-entry:hover {
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.15);
    transform: translateY(-1px);
}

.diary-transfer-entry.collapsed {
    padding: 0.75rem 1rem;
    cursor: pointer;
}

.diary-transfer-entry.expanded {
    padding: 1.5rem;
    cursor: default;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
    border-color: #3498db;
}

.diary-transfer-header {
    display: flex;
    flex-direction: column;
}

.diary-transfer-entry.collapsed .diary-transfer-header {
    margin-bottom: 0;
}

.diary-transfer-entry.expanded .diary-transfer-header {
    margin-bottom: 1rem;
}

/* Erste Zeile: Icon + Route + Edit-Button */
.diary-transfer-title-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}

.diary-transfer-title-row .diary-transfer-name {
    flex: 1;
    min-width: 0;
}

.diary-transfer-title-row .diary-edit-btn {
    margin-left: auto;
    flex-shrink: 0;
}

.diary-transfer-icon {
    font-size: 1.5rem;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.diary-transfer-name {
    color: #3498db;
    font-weight: bold;
    font-size: 1.1rem;
}

.transfer-from,
.transfer-to {
    padding: 4px 10px;
    background: white;
    border-radius: 4px;
    font-size: 0.9rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.diary-transfer-textarea {
    width: 100%;
    min-height: 70px;
    padding: 0.75rem;
    border: 1px solid #b0d4f1;
    border-radius: 6px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.95rem;
    line-height: 1.4;
    resize: vertical;
    background: white;
    transition: border-color 0.3s ease;
    margin-bottom: 0.75rem;
}

.diary-transfer-textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
}

.diary-transfer-textarea::placeholder {
    color: #adb5bd;
    font-style: italic;
}

/* Transfer-Bilder-Button */
.diary-image-btn {
    background: white;
    border: 2px solid #3498db;
    color: #3498db;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    margin-left: auto;
    font-family: inherit;
}

.diary-image-btn:hover {
    background: #3498db;
    color: white;
    transform: scale(1.05);
}

.diary-image-btn.has-images {
    background: #3498db;
    color: white;
    border-color: #2980b9;
}

.diary-image-btn.has-images:hover {
    background: #2980b9;
    transform: scale(1.05);
}

/* Responsive Design für Tagebuch */
@media (max-width: 740px) {
    .diary-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .diary-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .diary-content {
        padding: 1rem;
    }
    
    .diary-stop-entry {
        padding: 1rem;
    }
    
    .diary-stop-header {
        flex-direction: column;
        text-align: center;
    }

    .diary-transfer-header {
        flex-direction: column;
        text-align: center;
    }

    .diary-stop-name {
        font-weight: bold;
        font-size: 1rem;
    }

    .diary-transfer-name {
        font-weight: bold;
        font-size: 1rem;
    }
}

/* Drag&Drop Aktionen Modal */
.drag-drop-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.drag-action-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
    text-align: left;
    min-height: 70px;
    justify-content: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.drag-action-btn:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.drag-action-btn small {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    opacity: 0.8;
    font-weight: normal;
}

/* Drag&Drop Zustände */
.draggable-item {
    cursor: grab;
    transition: all 0.3s ease;
}

.draggable-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.draggable-item.dragging {
    opacity: 0.5;
    cursor: grabbing;
    transform: rotate(5deg);
}

.day-tab.drag-over {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.day-tab.drag-invalid {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
    cursor: not-allowed;
}

.drop-indicator {
    position: absolute;
    top: -2px;
    left: 0;
    right: 0;
    height: 4px;
    background: #667eea;
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.day-tab.drag-over .drop-indicator {
    opacity: 1;
}

/* Hotel/Stop Items draggable */
.hotel-item, .stop-item {
    position: relative;
}

.hotel-item.draggable-item, .stop-item.draggable-item {
    border: 1px dashed transparent;
}

.hotel-item.draggable-item:hover, .stop-item.draggable-item:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

/* Element verschieben/kopieren Modal */
.available-days-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
    max-height: 300px;
    overflow-y: auto;
}

.day-selection-btn {
    padding: 0.5rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-weight: 500;
    position: relative;
}

.day-now {
    border-color: #e63e14;
}

.day-selection-btn:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.day-selection-btn:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.day-selection-btn.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.day-selection-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f8f9fa;
    border-color: #dee2e6;
}

.day-selection-btn.disabled:hover {
    transform: none;
    box-shadow: none;
}

.day-btn-number {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.day-btn-date {
    display: block;
    font-size: 0.8rem;
    opacity: 0.8;
}

.day-btn-info {
    display: block;
    font-size: 0.7rem;
    margin-top: 0.25rem;
    opacity: 0.7;
}

.move-copy-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
    text-align: left;
    min-height: 70px;
    justify-content: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.action-btn:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.action-btn small {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    opacity: 0.8;
    font-weight: normal;
}

/* Multi-day Hotel Indicator */
.day-selection-btn .multi-day-indicator {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff6b6b;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.day-selection-btn.multi-day-valid .multi-day-indicator {
    background: #28a745;
}

/* Responsive Design */
@media (max-width: 740px) {
    .available-days-list {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 0.5rem;
    }
    
    .day-selection-btn {
        padding: 0.75rem 0.5rem;
    }
    
    .move-copy-actions {
        gap: 0.75rem;
    }
    
    .action-btn {
        padding: 0.75rem;
        min-height: 60px;
    }

    .json-actions {
        flex-direction: column;
    }
}

/* Transfer-Sektion */
.transfers-list {
    margin-top: 1rem;
}

/* .transfer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.transfer-icon {
    font-size: 1.2rem;
    margin-right: 0.5rem;
}

.transfer-name {
    font-weight: 600;
    color: #333;
    flex: 1;
}

.transfer-actions {
    display: flex;
    gap: 0.25rem;
}

.transfer-details {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
}

.transfer-route {
    margin: 0.25rem 0;
}

.transfer-duration {
    font-weight: 500;
    color: #495057;
}

.transfer-multiday-indicator {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #17a2b8;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
} */

/* Transfer-Modal */
.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
}

/* Gestrichelte Linien auf der Karte */
.transfer-route-line {
    stroke-dasharray: 10, 5;
    stroke-width: 3;
    opacity: 0.8;
}

.transfer-marker {
    border: 2px dashed #666;
    background: rgba(255, 255, 255, 0.9);
}

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

.transfer-popup h4 {
    margin: 0 0 0.5rem 0;
    color: #333;
}

.transfer-popup p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
}

@media (max-width: 740px) {
    .form-row {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Transport Mode Selection */
.transport-mode-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.transport-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
    position: relative;
}

.transport-option:hover {
    border-color: #667eea;
    background-color: #f8f9ff;
    transform: translateY(-1px);
}

.transport-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.transport-option input[type="radio"]:checked + .transport-icon {
    transform: scale(1.2);
}

.transport-option:has(input[type="radio"]:checked) {
    border-color: #667eea;
    background-color: #f0f2ff;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.transport-option:has(input[type="radio"]:checked) .transport-label {
    color: #667eea;
    font-weight: 600;
}

.transport-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
    transition: transform 0.2s ease;
}

.transport-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #333;
    transition: all 0.2s ease;
    text-align: center;
}

/* Fallback für Browser ohne :has() Support */
.transport-option.selected {
    border-color: #667eea;
    background-color: #f0f2ff;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.transport-option.selected .transport-icon {
    transform: scale(1.2);
}

.transport-option.selected .transport-label {
    color: #667eea;
    font-weight: 600;
}

/* Responsive Transport Selection */
@media (max-width: 740px) {
    .transport-mode-selection {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .transport-option {
        padding: 0.5rem 0.25rem;
    }
    
    .transport-icon {
        font-size: 1.25rem;
    }
    
    .transport-label {
        font-size: 0.8rem;
    }
}

/* Marker Visibility Controls */
.marker-visibility-controls {
    position: relative;
    display: inline-block;
}

.marker-toggle-btn {
    background-color: #6c757d;
    color: white;
    border: none;
    position: relative;
}

.marker-toggle-btn:hover {
    background-color: #5a6268;
}

.marker-toggle-btn.active {
    background-color: #667eea;
}

.marker-options-panel {
    /*position: absolute;*/
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 0.5rem;
    z-index: 1000;
    margin-top: 0.25rem;
}

.marker-option {
    margin-bottom: 0.5rem;
}

.marker-option:last-child {
    margin-bottom: 0;
}

.marker-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0.25rem 0;
    transition: background-color 0.2s ease;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
}

.marker-checkbox:hover {
    background-color: #f8f9ff;
}

.marker-checkbox input[type="checkbox"] {
    margin-right: 0.5rem;
    cursor: pointer;
}

.marker-label {
    font-size: 0.85rem;
    color: #333;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.marker-checkbox input[type="checkbox"]:checked + .marker-label {
    color: #667eea;
    font-weight: 500;
}

/* Spezielle Styling für "Alle Marker" Option */
.marker-checkbox:has(#showAllMarkers) {
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
}

.marker-checkbox:has(#showAllMarkers) .marker-label {
    font-weight: 600;
}

/* Animation für Panel */
.marker-options-panel {
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    pointer-events: none;
}

.marker-options-panel.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

/* Map Loading Overlay */
.map-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(2px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-loading-content {
    text-align: center;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 300px;
}

.map-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: mapSpin 1s linear infinite;
    margin: 0 auto 1rem auto;
}

@keyframes mapSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.map-loading-text h4 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.map-loading-text p {
    color: #666;
    margin: 0;
    font-size: 0.9rem;
}

/* Stats Loading Overlay */
.stats-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(3px);
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.stats-loading-content {
    text-align: center;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 300px;
}

.stats-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: statsSpin 1s linear infinite;
    margin: 0 auto 1rem auto;
}

@keyframes statsSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.stats-loading-text h4 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.stats-loading-text p {
    color: #666;
    margin: 0;
    font-size: 0.9rem;
}

/* Map Notifications */
.map-notification {
    position: absolute;
    top: 10px;
    right: 150px;
    max-width: 300px;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    z-index: 500;
    font-size: 0.85rem;
    line-height: 1.4;
    animation: slideInFromRight 0.3s ease-out;
}

.map-notification.warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.map-notification.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.map-notification.info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

.map-notification-icon {
    display: inline-block;
    margin-right: 0.5rem;
    font-weight: bold;
}

.map-notification-close {
    float: right;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
    margin-left: 0.5rem;
    padding: 0;
    line-height: 1;
}

.map-notification-close:hover {
    opacity: 1;
}

@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Landscape Orientation Optimizations */
/*  */

@media screen and (orientation: landscape) and (max-height: 500px) {
    /* Kompakterer Header im Querformat */
    header {
        padding: 0.35rem 1rem;
    }
}

/* GPS Location Button Styles */
.gps-location-btn {
    background-color: #4285f4 !important;
    color: white !important;
    border: none !important;
    transition: all 0.3s ease;
}

.gps-location-btn:hover {
    background-color: #3367d6 !important;
    transform: translateY(-1px);
}

.gps-location-btn:disabled {
    background-color: #9aa0a6 !important;
    cursor: not-allowed;
    transform: none;
}

.gps-location-btn.gps-loading {
    background-color: #ff9800 !important;
    animation: gpsLoadingPulse 1.5s ease-in-out infinite;
}

@keyframes gpsLoadingPulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Location Marker Option Styles */
#locationMarkerOption {
    border-top: 1px solid #e0e0e0;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
}

#locationMarkerOption .marker-label {
    color: #4285f4;
    font-weight: 500;
}

/* User Location Marker Styles */
.user-location-marker {
    background: transparent !important;
    border: none !important;
}

.user-location-dot {
    width: 20px;
    height: 20px;
    background-color: #4285f4;
    border: 3px solid white;
    border-radius: 50%;
    position: relative;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    animation: userLocationPulse 2s infinite;
}

.user-location-pulse {
    position: absolute;
    top: -8px;
    left: -8px;
    width: 32px;
    height: 32px;
    border: 2px solid #4285f4;
    border-radius: 50%;
    opacity: 0;
    animation: userLocationRipple 2s infinite;
}

@keyframes userLocationPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes userLocationRipple {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

/* User Location Popup Styles */
.user-location-popup {
    text-align: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.user-location-popup strong {
    color: #4285f4;
    font-size: 1.1rem;
}

.user-location-popup small {
    color: #666;
    line-height: 1.4;
}
/* Mobile Map Controls Collapse System */


@media (max-width: 1410px) {
    .map-controls {
        position: absolute;
        top: 10px;
        right: 10px;
        z-index: 1000;
        transition: transform 0.3s ease;
    }
    
    /* Toggle Tab */
    .map-controls-tab {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        background: rgba(102, 126, 234, 0.9);
        color: white;
        width: 25px;
        height: 60px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.8rem;
        cursor: pointer;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(102, 126, 234, 0.2);
        z-index: 1001;
        transition: all 0.3s ease;
        user-select: none;
        right: -25px;
        border-radius: 0 6px 6px 0;
        border-left: none;
    }
    
    .map-controls-tab:hover {
        background: rgba(102, 126, 234, 1);
        width: 28px;
    }
    
    /* Eingeklappter Zustand - nur blauer Tab sichtbar */
    .map-controls.collapsed {
        transform: translateX(calc(100% + 10px)) !important;
    }
    
    .map-controls.collapsed .map-controls-content {
        opacity: 0 !important;
        pointer-events: none !important;
        visibility: hidden !important;
    }
    
    .map-controls.collapsed .map-controls-tab {
        left: -25px !important;
        right: auto !important;
        border-radius: 6px 0 0 6px !important;
        border-right: none !important;
        border-left: 1px solid rgba(102, 126, 234, 0.2) !important;
        box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1) !important;
    }
    
    /* Ausgeklappter Zustand - normales Panel ohne Tab */
    .map-controls:not(.collapsed) .map-controls-tab {
        display: none !important;
    }
    
    .map-controls:not(.collapsed) .map-controls-content {
        opacity: 1 !important;
        pointer-events: all !important;
        visibility: visible !important;
    }
    
    /* Tab Arrow Styling */
    .tab-arrow {
        display: block;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .tab-arrow::before {
        font-size: 0.8rem;
        color: white;
    }
    
    /* Content-Bereich */
    .map-controls-content {
        background: rgba(255, 255, 255, 0.95);
        border-radius: 8px;
        padding: 10px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.2);
        display: flex;
        flex-direction: column;
        gap: 8px;
        min-width: 140px;
        transition: opacity 0.3s ease;
    }
    
    .map-controls.collapsed .map-controls-content {
        opacity: 0;
        pointer-events: none;
    }
    
    .marker-checkbox input[type="checkbox"] {
        width: 16px;
        height: 16px;
    }
}

/* Landscape Mobile Optimizations */
/* @media screen and (orientation: landscape) and (max-height: 500px) {
    .map-controls {
        top: 5px;
        right: 5px;
    }
    
    .map-controls.collapsed::before,
    .map-controls:not(.collapsed)::before {
        height: 50px;
        width: 22px;
        font-size: 0.7rem;
    }
    
    .map-controls.collapsed::before:hover,
    .map-controls:not(.collapsed)::before:hover {
        width: 25px;
    }
    
    .map-controls-content {
        padding: 8px;
        gap: 6px;
        min-width: 120px;
    }
    
    .map-controls .btn {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
        min-height: 28px;
    }
    
    .marker-options-panel {
        max-height: 120px;
    }
    
    .marker-checkbox {
        min-height: 24px;
    }
} */

/* Pcloud Images Modal Styles */
.large-modal {
    max-width: 80vw;
    max-height: 80vh;
    overflow: scroll;
}

.fullscreen-body {
    display: flex;
    justify-content: center;
}

.fullscreen-body img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.pcloud-input-container {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
    padding-bottom: 1rem;
}

.pcloud-input-container input {
    flex: 1;
    padding: 0.5rem
}

.pcloud-loading {
    text-align: center;
    padding: 2rem;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.pcloud-controls {
    border-bottom: 1px solid #e0e0e0;
    padding-right: 1.3rem;
}

.image-padding {
    padding-right: 1.3rem;
}
.view-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.view-toggle {
    display: flex;
    gap: 0.25rem;
}

.view-btn {
    padding: 0.2rem;
    border: 2px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Control Sections */
.control-section {
    margin-bottom: 0.75rem;
}

.control-heading {
    font-size: 0.75rem;
    font-weight: 600;
    color: #666;
    margin: 0 0 0.25rem 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
}

.control-heading-inline {
    font-size: 0.7rem;
    font-weight: 600;
    color: #666;
    margin: 0 0 0.15rem 0;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1;
    text-align: left;
}

.sort-filter-controls {
    display: flex;
    gap: 0.5rem;
}


.filter-controls {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}

/* Filter Groups */
.date-filter-group,
.type-filter-group,
.exclude-filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sort-controls {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    align-items: flex-start;
}

/* Custom Date Range */
.custom-date-range {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    box-sizing: border-box;
}

.date-inputs {
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.date-input {
    padding: 0.2rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.85rem;
}

.date-separator {
    color: #666;
    font-weight: 500;
    white-space: nowrap;
}


.selection-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.selection-buttons {
    display: flex;
    gap: 0.25rem;
}

.selection-buttons .btn {
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
}

#selectRangeBtn.active {
    background-color: #ff9800 !important;
    color: white !important;
}

/* Range Selection Hint */
.range-selection-hint {
    background: rgba(255, 152, 0, 0.1);
    border: 2px solid #ff9800;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    text-align: center;
    animation: pulse 2s infinite;
}

.hint-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.hint-icon {
    font-size: 1.2rem;
}

.hint-text {
    font-weight: 600;
    color: #ff9800;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Range Start Marking */
.range-start {
    border: 3px solid #ff9800 !important;
    box-shadow: 0 0 10px rgba(255, 152, 0, 0.5) !important;
}

/* Mobile Filter Button */
.mobile-filter-button {
    display: none;
}

.mobile-filter-button .btn {
    width: 100%;
    text-align: center;
}

/* Mobile Filter Modal */
.mobile-filter-content {
    padding: 0;
    padding-right: 0.65rem;
    overflow-y: auto;
}

.mobile-filter-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.mobile-filter-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.mobile-sort-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.mobile-date-filter {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-custom-date-range {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 0.75rem;
    margin-top: 0.5rem;
}

.mobile-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 6px;
    cursor: pointer;
}

/* Mobile Responsive Updates */
@media (max-width: 740px) {
    /* Hide desktop filter controls on mobile */
    .desktop-filter-controls {
        display: none !important;
    }
    
    /* Show mobile filter button */
    .mobile-filter-button {
        display: block !important;
    }

    .mobile-date-filter {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .control-section {
        margin-bottom: 1rem;
    }
    
    .control-heading {
        font-size: 0.7rem;
        margin-bottom: 0.4rem;
    }
    
    .control-heading-inline {
        font-size: 0.65rem;
        margin-bottom: 0.2rem;
    }
    
    .sort-filter-controls {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .filter-controls {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .date-filter-group {
        gap: 0.4rem;
    }
    
    .date-inputs {
        flex-direction: column;
        align-items: stretch;
    }
    
    .date-separator {
        text-align: center;
        margin: 0.25rem 0;
    }
    
    .date-input {
        min-width: auto;
    }
    
    .selection-controls {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .form-select {
        font-size: 0.8rem;
        padding: 0.4rem;
    }
}

.form-select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    font-size: 0.9rem;
}

.selection-info {
    font-weight: 600;
    color: var(--primary-color);
}

/* Images Grid View */
.images-grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    padding: 1rem 0;
}

.image-grid-item {
    position: relative;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f8f9fa;
}

.image-grid-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.image-grid-item.selected {
    border-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.1);
}

.image-thumbnail {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.image-placeholder {
    width: 100%;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    color: #666;
    font-size: 2rem;
}

.image-info {
    padding: 0.5rem;
    background: white;
}

.image-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
    word-break: break-word;
}

.image-meta {
    font-size: 0.7rem;
    color: #666;
}

.image-checkbox {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 20px;
    height: 20px;
    z-index: 10;
}

.image-menu {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 10;
}

.image-menu-btn {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 120px;
    z-index: 20;
    display: none;
}

.image-menu-dropdown.show {
    display: block;
}

.image-menu-item {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.image-menu-item:hover {
    background: #f8f9fa;
}

.image-menu-item:last-child {
    border-bottom: none;
}

/* Images List View */
.images-list-view {
    padding: 1rem 0;
}

.image-list-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
    overflow: auto;
}

.image-list-item:hover {
    border-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.05);
}

.image-list-item.selected {
    border-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.1);
}

.image-list-checkbox {
    margin-right: 1rem;
}

.image-list-icon {
    width: 40px;
    height: 40px;
    background: #f0f0f0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-size: 1.2rem;
    color: #666;
}

.image-list-details {
    flex: 1;
}

.image-list-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.image-list-meta {
    font-size: 0.8rem;
    color: #666;
}

.no-images-message {
    text-align: center;
    padding: 3rem 1rem;
    color: #666;
}

.no-images-message p {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

/* Add Images Button in Diary */
.diary-images-btn {
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border: 2px dashed #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

.diary-images-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(102, 126, 234, 0.05);
}

.diary-images-btn.has-images {
    background: rgba(102, 126, 234, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
    border-style: solid;
}

/* Mobile Responsive */
@media (max-width: 740px) {
    .large-modal {
        width: 95vw;
        max-width: 95vw;
        height: 95%;
        max-height: 95%;
        padding-left: 1rem;
        padding-top: 1rem;
        padding-right: 0.35rem;
    }

    .small-modal {
        padding-left: 1rem;
        padding-top: 1rem;
        padding-right: 0.35rem;
        margin-top: 10%;
    }
    
    .images-grid-view {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.75rem;
    }
    
    .image-thumbnail, .image-placeholder {
        height: 100px;
    }
    
    .pcloud-input-container input {
        margin-bottom: 0.5rem;
        padding: 0.3rem;
    }

    .image-padding {
        padding-right: 0.65rem;
    }
}

/* Stop Context Menu */
.stop-context-menu {
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 0.25rem 0;
    min-width: 180px;
    font-size: 0.9rem;
}

.context-menu-item {
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.context-menu-item:hover {
    background: #f8f9fa;
}

.context-menu-item.danger {
    color: #dc3545;
}

.context-menu-item.danger:hover {
    background: #f8d7da;
}

/* Google Maps Integration */
.google-maps-link {
    cursor: pointer;
    text-decoration: underline;
    color: #667eea !important;
    transition: color 0.2s ease;
}

.google-maps-link:hover {
    color: #5a67d8 !important;
    text-decoration: underline;
}

.google-maps-route-btn {
    background: #4285f4;
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.google-maps-route-btn:hover {
    background: #3367d6;
}

/* Expandable Location Elements */
.expandable-location {
    display: inline;
}

.location-dots {
    cursor: pointer;
    color: #667eea;
    font-weight: bold;
    padding: 0 2px;
    transition: color 0.2s ease;
}

.location-dots:hover {
    color: #5a67d8;
    text-decoration: underline;
}

.location-remaining {
    display: none;
}

.location-truncated {
    display: inline;
}
