/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8fafc;
    color: #1e293b;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Login Screen */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.login-container {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    width: 100%;
    max-width: 400px;
    margin: 1rem;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #64748b;
    font-size: 0.95rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.login-btn {
    width: 100%;
    padding: 0.875rem;
    font-size: 1rem;
    font-weight: 600;
}

.login-error {
    background: #fee2e2;
    color: #dc2626;
    padding: 0.75rem;
    border-radius: 0.5rem;
    text-align: center;
    font-size: 0.875rem;
    border: 1px solid #fecaca;
}

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: #64748b;
}

.hidden {
    display: none;
}

/* Layout */
#app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    background: #2563eb;
    color: white;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.header-title.clickable {
    cursor: pointer;
    transition: opacity 0.2s;
}

.header-title.clickable:hover {
    opacity: 0.8;
}

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

.main {
    flex: 1;
    position: relative;
}

.view {
    padding: 1rem;
    animation: slideIn 0.3s ease-out;
}

.view.hidden {
    display: none;
}

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

.view-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.view-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    flex: 1;
}

.trip-notes {
    padding: 1rem 0;
    margin-bottom: 1.5rem;
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.5;
    font-style: italic;
    text-align: center;
}

.trip-notes:empty {
    display: none;
}

/* Buttons */
.btn-primary {
    background: #2563eb;
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.2s;
    min-height: 44px;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-primary:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

.btn-secondary {
    background: #e2e8f0;
    color: #475569;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    min-height: 44px;
}

.btn-secondary:hover {
    background: #cbd5e1;
}

.btn-danger {
    background: #ef4444 !important;
    color: white !important;
    border: 1px solid #dc2626 !important;
}

.btn-danger:hover {
    background: #dc2626 !important;
    border-color: #b91c1c !important;
}

.templates-footer {
    padding: 2rem 1rem 1rem;
    text-align: center;
    border-top: 1px solid #e2e8f0;
    margin-top: 2rem;
}

.btn-icon {
    background: none;
    border: none;
    color: currentColor;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    transition: background 0.2s;
}

.btn-icon:hover {
    background: rgba(255,255,255,0.1);
}

.btn-back {
    background: none;
    border: none;
    color: #475569;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    min-width: 44px;
    min-height: 44px;
}

.btn-back:hover {
    background: #f1f5f9;
}

.btn-text {
    background: none;
    border: none;
    color: #2563eb;
    cursor: pointer;
    padding: 0.5rem;
    font-weight: 500;
    min-height: 44px;
}

.btn-close {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    min-width: 44px;
    min-height: 44px;
}

.fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(37,99,235,0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    z-index: 50;
}

.fab:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(37,99,235,0.5);
}

/* Trips List */
.trips-list {
    display: grid;
    gap: 1rem;
}

.trip-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #e2e8f0;
}

.trip-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.trip-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.trip-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
}

.trip-date {
    font-size: 0.875rem;
    color: #64748b;
}

.trip-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: #64748b;
}

.trip-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Filters */
.filters {
    margin-bottom: 1.5rem;
}

.filter-chips {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.filter-chip {
    background: #f1f5f9;
    color: #475569;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 1.5rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 44px;
}

.filter-chip.active {
    background: #2563eb;
    color: white;
}

.filter-chip:hover:not(.active) {
    background: #e2e8f0;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem;
    padding-right: 3rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    min-height: 44px;
}

.search-box input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.search-box svg {
    position: absolute;
    right: 1rem;
    color: #9ca3af;
    pointer-events: none;
}

/* Trip Items */
.trip-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-bottom: 6rem;
}

.category-group {
    margin-bottom: 1.5rem;
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    cursor: pointer;
    user-select: none;
    min-height: 44px;
}

.category-title {
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-count {
    font-size: 0.875rem;
    color: #6b7280;
    background: #f3f4f6;
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
}

.category-toggle {
    transition: transform 0.2s;
}

.category-group.collapsed .category-toggle {
    transform: rotate(-90deg);
}

.category-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category-group.collapsed .category-items {
    display: none;
}

.category-group.collapsed {
    margin-bottom: 0.5rem; /* Weniger Abstand, wenn eingeklappt */
}

.trip-item {
    background: white;
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    border: 1px solid #e5e7eb;
    position: relative;
    transition: all 0.3s ease;
    transform: translateX(0);
    cursor: pointer;
    user-select: none;
    touch-action: pan-y;
}

.trip-item.packed {
    background: #f0f9ff;
    border-color: #0ea5e9;
    opacity: 0.8;
}

.trip-item.packed .item-name {
    text-decoration: line-through;
    color: #64748b;
}

.trip-item.swiping-left {
    background: #dcfce7;
    border-color: #16a34a;
}

.trip-item.swiping-right {
    background: #fee2e2;
    border-color: #dc2626;
}

.trip-item-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.item-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.item-checkbox.checked {
    background: #16a34a;
    border-color: #16a34a;
    color: white;
}

.item-info {
    flex: 1;
    min-width: 0;
}

.item-name {
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.item-details {
    font-size: 0.875rem;
    color: #6b7280;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.item-quantity {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: auto;
    flex-shrink: 0;
}

.quantity-btn {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
}

.quantity-btn:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

.quantity-btn:active {
    background: #cbd5e1;
    transform: scale(0.95);
}

.quantity-input {
    width: 50px;
    text-align: center;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    padding: 0.25rem;
    font-size: 0.875rem;
    background: white;
}

.quantity-unit {
    font-size: 0.875rem;
    color: #64748b;
    margin-left: 0.25rem;
}

.quantity-input {
    width: 60px;
    padding: 0.25rem 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    text-align: center;
}

.swipe-hint {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.875rem;
    font-weight: 500;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
}

.swipe-hint.left {
    left: 1rem;
    color: #16a34a;
}

.swipe-hint.right {
    right: 1rem;
    color: #dc2626;
}

.trip-item.swiping-left .swipe-hint.left,
.trip-item.swiping-right .swipe-hint.right {
    opacity: 1;
}

/* Templates */
.templates-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-top: 1.5rem;
}

.category-section {
    margin-bottom: 1.5rem;
}

.category-section:first-child {
    margin-top: 0;
}

.category-section h4 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
}

.category-add-btn {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px dashed #d1d5db;
    padding: 0.5rem;
    border-radius: 0.375rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    min-height: 32px;
    transition: all 0.2s;
}

.category-add-btn:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
    color: #374151;
}

.category-add-btn svg {
    width: 16px;
    height: 16px;
}

.category-delete-btn {
    background: #fef2f2;
    color: #dc2626;
    border: 1px dashed #fca5a5;
    padding: 0.5rem;
    border-radius: 0.375rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    min-height: 32px;
    transition: all 0.2s;
    margin-left: 0.5rem;
}

.category-delete-btn:hover {
    background: #fee2e2;
    border-color: #f87171;
    color: #b91c1c;
}

.category-delete-btn svg {
    width: 16px;
    height: 16px;
}

.template-item {
    background: white;
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    transform: translateX(0);
    position: relative;
    user-select: none;
    touch-action: pan-y;
}

.template-item:hover {
    border-color: #2563eb;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.template-item.swiping-left {
    background: #dcfce7;
    border-color: #16a34a;
}

.template-item.swiping-right {
    background: #fee2e2;
    border-color: #dc2626;
}

.template-item .swipe-hint {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.875rem;
    font-weight: 500;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
}

.template-item .swipe-hint.left {
    left: 1rem;
    color: #16a34a;
}

.template-item .swipe-hint.right {
    right: 1rem;
    color: #dc2626;
}

.template-item.swiping-left .swipe-hint.left,
.template-item.swiping-right .swipe-hint.right {
    opacity: 1;
}

.template-info {
    flex: 1;
    min-width: 0;
    margin-right: auto;
}

.template-name {
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 0.25rem;
}


.template-details {
    font-size: 0.875rem;
    color: #6b7280;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.template-actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.template-delete-icon {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 36px;
    transition: all 0.2s;
}

.template-delete-icon:hover {
    color: #dc2626;
    background: #fef2f2;
}

.template-delete-icon svg {
    width: 16px;
    height: 16px;
}

/* Overlays */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 200;
    display: flex;
    align-items: flex-end;
    animation: fadeIn 0.3s ease-out;
}

.overlay.hidden {
    display: none;
}

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

.overlay-content {
    background: white;
    width: 100%;
    max-height: 90vh;
    border-radius: 1rem 1rem 0 0;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.overlay-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.overlay-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
}

.overlay-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.overlay-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

.selectable-item {
    background: white;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 0.5rem;
    border: 2px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.2s;
}

.selectable-item:hover {
    border-color: #93c5fd;
}

.selectable-item.selected {
    border-color: #2563eb;
    background: #eff6ff;
}

.selectable-item.selected .template-name {
    color: #1e293b;
    font-weight: 600;
}

.selectable-item-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.selection-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.selection-checkbox.checked {
    background: #2563eb;
    border-color: #2563eb;
    color: white;
}

/* Menu */
.menu-items {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.menu-item {
    width: 100%;
    background: white;
    border: 1px solid #e5e7eb;
    padding: 1rem 1.25rem;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-radius: 0.75rem;
    transition: all 0.2s;
    font-size: 1rem;
    font-weight: 500;
    color: #374151;
    min-height: 56px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.menu-item:hover {
    background: #f8fafc;
    border-color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.menu-item svg {
    color: #2563eb;
    flex-shrink: 0;
}

/* Snackbar */
.snackbar {
    position: fixed;
    bottom: 2rem;
    left: 1rem;
    right: 1rem;
    background: #1f2937;
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 300;
    animation: slideUp 0.3s ease-out;
}

.snackbar.hidden {
    display: none;
}

/* Responsive */
@media (min-width: 768px) {
    .main {
        max-width: 800px;
        margin: 0 auto;
    }
    
    .overlay-content {
        max-width: 600px;
        margin: 0 auto;
        border-radius: 1rem;
        max-height: 80vh;
        margin-top: 10vh;
    }
    
    .fab {
        bottom: 3rem;
        right: 3rem;
    }
    
    .trips-list {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body {
        background: #0f172a;
        color: #e2e8f0;
    }
    
    .header {
        background: #1e293b;
    }
    
    .trip-card, .trip-item, .template-item, .selectable-item {
        background: #1e293b;
        border-color: #334155;
        color: #e2e8f0; /* Default text color for these elements */
    }

    .trip-name, .item-name, .template-name, .category-title {
        color: #f1f5f9; /* Ensure names are visible in dark mode */
    }
    
    .search-box input {
        background: #1e293b;
        border-color: #334155;
        color: #e2e8f0;
    }
    
    .filter-chip {
        background: #334155;
        color: #e2e8f0;
    }
    
    .overlay-content {
        background: #1e293b;
    }
    
    .overlay-footer {
        background: #0f172a;
    }
}

/* Forms */
.form-overlay {
    max-width: 500px;
    margin: 0 auto;
    margin-top: 5vh;
}

.form-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: #374151;
    font-size: 0.875rem;
}

.form-help {
    font-size: 0.8rem;
    color: #6b7280;
    margin: 0.25rem 0;
    line-height: 1.4;
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    min-height: 44px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

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

/* Custom Checkbox */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-weight: 500;
    color: #374151;
    padding: 0.5rem 0;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #2563eb;
    border-color: #2563eb;
    color: white;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark:after {
    content: '✓';
    font-size: 12px;
    font-weight: bold;
}

.quantity-fields {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
}

.quantity-fields.hidden {
    display: none;
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 1px solid #e5e7eb;
    min-width: 180px;
    z-index: 1000;
    overflow: hidden;
    margin-top: 0.25rem;
}

.dropdown-menu.hidden {
    display: none;
}

.dropdown-item {
    width: 100%;
    background: none;
    border: none;
    padding: 0.75rem 1rem;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: #374151;
    transition: background 0.2s;
    min-height: 44px;
}

.dropdown-item:hover {
    background: #f3f4f6;
}

.dropdown-item.danger {
    color: #dc2626;
}

.dropdown-item.danger:hover {
    background: #fef2f2;
}

.dropdown-item svg {
    flex-shrink: 0;
}

.trip-actions {
    position: relative;
    z-index: 10;
}

/* Confirm Dialog */
.confirm-dialog {
    max-width: 400px;
    margin: 20vh auto 0;
    border-radius: 1rem;
}

.confirm-content {
    padding: 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.confirm-icon {
    width: 64px;
    height: 64px;
    background: #dcfce7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #16a34a;
}

.confirm-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.confirm-content p {
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

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

/* Dark mode form styles */
@media (prefers-color-scheme: dark) {
    .form-content {
        background: #1e293b;
    }
    
    .form-group label {
        color: #e2e8f0;
    }
    
    .form-help {
        color: #94a3b8;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        background: #334155;
        border-color: #475569;
        color: #e2e8f0;
    }
    
    .form-group input:focus,
    .form-group textarea:focus,
    .form-group select:focus {
        border-color: #3b82f6;
        box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
    }
    
    .form-actions {
        border-color: #475569;
    }
    
    .checkbox-label {
        color: #e2e8f0;
    }
    
    .checkmark {
        border-color: #475569;
        background: #334155;
    }
    
    .quantity-fields {
        background: #0f172a;
        border-color: #334155;
    }
    
    .confirm-content {
        background: #1e293b;
        color: #e2e8f0;
    }
    
    .quantity-btn {
        background: #374151;
        border-color: #4b5563;
        color: #d1d5db;
    }
    
    .quantity-btn:hover {
        background: #4b5563;
        border-color: #6b7280;
    }
    
    .quantity-btn:active {
        background: #6b7280;
    }
    
    .quantity-input {
        background: #374151;
        border-color: #4b5563;
        color: #f9fafb;
    }
    
    .quantity-unit {
        color: #9ca3af;
    }
    
    
    .templates-footer {
        border-color: #334155;
    }
    
    .confirm-content h3 {
        color: #f1f5f9;
    }
    
    .confirm-content p {
        color: #94a3b8;
    }
    
    .dropdown-menu {
        background: #1e293b;
        border-color: #475569;
    }
    
    .dropdown-item {
        color: #e2e8f0;
    }
    
    .dropdown-item:hover {
        background: #334155;
    }
    
    .dropdown-item.danger {
        color: #f87171;
    }
    
    .dropdown-item.danger:hover {
        background: #1f2937;
    }
    
    .category-section h4 {
        color: #f1f5f9;
        border-color: #475569;
    }
    
    .category-add-btn {
        background: #334155;
        color: #94a3b8;
        border-color: #475569;
    }
    
    .category-add-btn:hover {
        background: #475569;
        border-color: #64748b;
        color: #e2e8f0;
    }
    
    .category-delete-btn {
        background: #1f2937;
        color: #f87171;
        border-color: #dc2626;
    }
    
    .category-delete-btn:hover {
        background: #374151;
        border-color: #f87171;
        color: #fca5a5;
    }
    
    .template-delete-icon {
        color: #64748b;
    }
    
    .template-delete-icon:hover {
        color: #f87171;
        background: #1f2937;
    }
    
    .menu-item {
        background: #1e293b;
        border-color: #475569;
        color: #e2e8f0;
    }
    
    .menu-item:hover {
        background: #334155;
        border-color: #3b82f6;
    }
    
    .menu-item svg {
        color: #60a5fa;
    }
    
    .trip-notes {
        color: #94a3b8;
    }
    
    .selectable-item.selected .template-name {
        color: #f1f5f9;
    }
}

/* Touch improvements */
@media (hover: none) and (pointer: coarse) {
    .trip-item {
        padding: 1.25rem;
    }
    
    .btn-primary, .btn-secondary {
        min-height: 48px;
        padding: 0.875rem 1.25rem;
    }
    
    .btn-icon {
        min-width: 48px;
        min-height: 48px;
    }
    
    .filter-chip {
        min-height: 48px;
        padding: 0.75rem 1.25rem;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        min-height: 48px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .checkbox-label {
        min-height: 48px;
    }
    
    .checkmark {
        width: 24px;
        height: 24px;
    }
}
