/* ToTravelDo - Styling */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* iOS PWA safe area support */
html {
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

body {
    /* Voorkom overscroll bounce op iOS */
    overscroll-behavior: none;
    -webkit-overflow-scrolling: touch;
}

/* Standalone mode (PWA) styling */
@media all and (display-mode: standalone) {
    body {
        padding-top: env(safe-area-inset-top);
    }
}

#edit_dag_item_beschrijving{
    height:215px;
    font-size:11px;
}

/* Grote notes textarea voor extrainfo */
.notes-textarea {
    transition: height 0.3s ease, min-height 0.3s ease;
}

.notes-textarea.notes-large {
    min-height: 250px;
    font-size: 12px;
}
/* Notification System */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
    pointer-events: none;
}

.notification {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 300px;
    max-width: 400px;
    pointer-events: auto;
    animation: slideInRight 0.3s ease-out;
    position: relative;
    overflow: hidden;
}

.notification::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #666;
}

.notification.success {
    border-color: #4CAF50;
}

.notification.success::before {
    background: #4CAF50;
}

.notification.error {
    border-color: #f44336;
}

.notification.error::before {
    background: #f44336;
}

.notification.warning {
    border-color: #FF9800;
}

.notification.warning::before {
    background: #FF9800;
}

.notification.info {
    border-color: #2196F3;
}

.notification.info::before {
    background: #2196F3;
}

.notification-icon {
    font-size: 1.5em;
    flex-shrink: 0;
    line-height: 1;
}

.notification.success .notification-icon {
    color: #4CAF50;
}

.notification.error .notification-icon {
    color: #f44336;
}

.notification.warning .notification-icon {
    color: #FF9800;
}

.notification.info .notification-icon {
    color: #2196F3;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    font-size: 0.95em;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.notification-message {
    font-size: 0.9em;
    color: #666;
    line-height: 1.4;
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.2em;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.2s;
}

.notification-close:hover {
    color: #333;
}

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

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

.notification.hiding {
    animation: slideOutRight 0.3s ease-out forwards;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    padding: 10px;
    color: #333;
}

.container {
    width: 100%;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

header {
    background: #1a1a1a;
    color: white;
    padding: 10px 20px;
    text-align: center;
}

header h1 {
    font-size: 3em;
    margin: 0;
    font-weight: 600;
}

.subtitle {
    font-size: 0.85em;
    opacity: 0.8;
    margin: 0;
}

.message {
    padding: 10px 15px;
    margin: 10px 15px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.9em;
}

.message.success {
    background: #e8e8e8;
    color: #1a1a1a;
    border: 1px solid #cccccc;
}

.message.error {
    background: #d3d3d3;
    color: #1a1a1a;
    border: 1px solid #999999;
}

section {
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
}

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

section h2 {
    color: #1a1a1a;
    margin-bottom: 12px;
    font-size: 1.2em;
    font-weight: 600;
}

/* Kalender Styling */
.calendar-container {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 12px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.calendar-header h2 {
    margin: 0;
    color: #333;
    font-size: 1.1em;
    font-weight: 600;
}

.calendar-nav {
    background: #333333;
    color: white;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.9em;
    transition: background 0.3s;
}

.calendar-nav:hover {
    background: #1a1a1a;
}

.calendar-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.calendar-table thead {
    background: #333333;
    color: white;
}

.calendar-table th {
    padding: 8px 4px;
    text-align: center;
    font-weight: 600;
    font-size: 0.85em;
}

.calendar-table td {
    padding: 6px 4px;
    text-align: center;
    border: 1px solid #e0e0e0;
    position: relative;
    min-height: 40px;
    vertical-align: top;
    font-size: 0.85em;
}

.calendar-table td:not(:empty) {
    min-height: 50px;
}

.calendar-table td.today {
    background: #e0e0e0;
    font-weight: bold;
}

.calendar-table td.has-reis {
    background: #d3d3d3;
    cursor: pointer;
}

.calendar-table td.has-reis:hover {
    background: #b8b8b8;
}

.day-number {
    display: block;
    margin-bottom: 5px;
}

.reis-indicator {
    display: block;
    width: 8px;
    height: 8px;
    background: #1a1a1a;
    border-radius: 50%;
    margin: 5px auto 0;
}

/* Formulier Styling */
.reis-form {
    max-width: 600px;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
}

.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
    font-size: 0.9em;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 8px 10px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    font-size: 0.9em;
    transition: border-color 0.3s;
    background: white;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #1a1a1a;
}

.info-text {
    color: #666;
    font-style: italic;
    padding: 15px;
    background: #f0f0f0;
    border-radius: 6px;
}

.btn-primary {
    background: #1a1a1a;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 0.9em;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    width: 100%;
}

.btn-primary:hover {
    background: #333333;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Plus Button */
.btn-plus {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #1a1a1a;
    color: white;
    border: none;
    font-size: 1.5em;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background 0.2s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.btn-plus:hover {
    background: #333333;
    transform: scale(1.1);
}

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

.btn-text {
    background: transparent;
    color: #1a1a1a;
    border: none;
    padding: 8px 16px;
    font-size: 0.9em;
    cursor: pointer;
    transition: color 0.2s;
    text-decoration: underline;
}

.btn-text:hover {
    color: #666;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.2em;
    color: #1a1a1a;
}

.modal-close {
    font-size: 1.5em;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #1a1a1a;
}

.modal-content .reis-form {
    padding: 20px;
    margin: 0;
    background: white;
}

.btn-secondary {
    background: #666;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 0.9em;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

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

/* Reizen Overzicht */
.reizen-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.reis-card {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.reis-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.reis-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.reis-link h3 {
    margin: 0 0 8px 0;
    color: #1a1a1a;
    font-size: 1.1em;
}

.reis-datum {
    color: #666;
    font-size: 0.85em;
    margin: 5px 0;
}

.reis-info {
    color: #888;
    font-size: 0.8em;
    margin: 5px 0 0 0;
}

.btn-delete {
    background: #666;
    color: white;
    border: none;
    padding: 6px 12px;
    font-size: 0.8em;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
    width: 100%;
}

.btn-delete:hover {
    background: #444;
}

/* Reisdelen Overzicht */
.reisdelen-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.reisdeel-card {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: move;
    transition: transform 0.2s, box-shadow 0.2s;
}

.reisdeel-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateX(2px);
}

.reisdeel-card.dragging {
    opacity: 0.5;
}

.reisdeel-drag-handle {
    font-size: 1.2em;
    color: #999;
    cursor: grab;
    user-select: none;
    flex-shrink: 0;
}

.reisdeel-drag-handle:active {
    cursor: grabbing;
}

.reisdeel-content {
    flex: 1;
}

.reisdeel-card h3 {
    margin: 0 0 8px 0;
    color: #1a1a1a;
    font-size: 1em;
}

.reisdeel-info {
    color: #666;
    font-size: 0.85em;
    margin: 5px 0;
}

.reisdeel-datum {
    color: #888;
    font-size: 0.8em;
    margin: 5px 0 0 0;
}

/* Reisdelen Panels */
.reisdelen-panels {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.reisdeel-panel {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.reisdeel-panel-header {
    background: #e8e8e8;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #d0d0d0;
    color: white;
}

.reisdeel-panel-header-content {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.reisdeel-panel-title {
    cursor: pointer;
    padding: 5px 10px;
    margin: -5px -10px;
    border-radius: 6px;
    transition: background 0.2s;
}

.reisdeel-panel-title:hover {
    background: rgba(255, 255, 255, 0.15);
}

.reisdeel-panel-title h3 {
    margin: 0 0 5px 0;
    color: white;
    font-size: 2em;
}

.reisdeel-panel-info {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85em;
    margin: 0;
}

.reisdeel-panel-actions {
    display: flex;
    gap: 5px;
}

.btn-hotel {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background 0.2s;
}

.btn-hotel:hover {
    background: rgba(255, 255, 255, 0.3);
}

.hotel-info-panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: background 0.2s;
    position: relative;
    min-height: 100px;
}

.hotel-info-panel-header:hover {
    background: rgba(255, 255, 255, 0.25);
}

.hotel-notes-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9em;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.hotel-foto-small {
    flex-shrink: 0;
    width: 150px;
    height: 100px;
    overflow: hidden;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.2);
}

.hotel-foto-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hotel-details-small {
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
    flex: 1;
    min-height: 100px;
    padding-bottom: 30px;
    padding-right: 35px;
}

.hotel-details-small h4 {
    margin: 0;
    color: white;
    font-size: 0.9em;
    font-weight: 600;
    white-space: nowrap;
}

.hotel-pricing-small {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.hotel-website-link {
    display: inline-block;
    background: #1a1a1a;
    color: white;
    text-decoration: none;
    font-size: 0.75em;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
    position: absolute;
    bottom: 0;
    right: 0;
}

.hotel-website-link:hover {
    background: #333;
}

.hotel-prijs-small {
    font-weight: 600;
    color: white;
    font-size: 0.85em;
}

.hotel-betaald-small {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8em;
}

.btn-hotel-add {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
    transition: background 0.2s;
}

.btn-hotel-add:hover {
    background: rgba(255, 255, 255, 0.25);
}

.reisdeel-content-wrapper {
    display: flex;
    gap: 20px;
    padding: 15px;
    align-items: stretch; /* Laat beide kolommen even hoog zijn */
}

.items-kolom {
    flex: 1;
    min-width: 300px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    min-height: 200px;
    max-height: none;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.items-kolom h4 {
    margin: 0;
    color: #1a1a1a;
    font-size: 1em;
}

.btn-plus-small {
    background: #1a1a1a;
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 1.2em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
}

.btn-plus-small:hover {
    background: #333;
}

.info-text-small {
    color: #999;
    font-size: 0.85em;
    font-style: italic;
    text-align: center;
    padding: 20px 0;
    margin: 0;
}

.items-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    min-height: 100px;
    transition: background-color 0.2s;
    flex: 1; /* Neem alle resterende ruimte in */
    align-content: flex-start; /* Items bovenaan uitlijnen */
}

.items-list.drag-over {
    background-color: #f0f8ff;
    border: 2px dashed #4A90E2;
    border-radius: 6px;
    padding: 10px;
}

.item-card {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 10px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.item-card:active {
    cursor: grabbing;
}

.item-card-main {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.item-label-emoji {
    font-size: 1em;
    flex-shrink: 0;
    line-height: 1.4;
}

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

.item-card-content strong {
    display: block;
    word-break: break-word;
    font-size: 0.95em;
    line-height: 1.3;
}

/* Beschrijving met read more voor item cards */
.item-beschrijving-wrapper {
    position: relative;
    margin-top: 4px;
}

.item-beschrijving {
    margin: 0;
    font-size: 0.8em;
    color: #666;
    max-height: 2.4em;
    overflow: hidden;
    transition: max-height 0.3s ease;
    line-height: 1.2;
}

.item-beschrijving-wrapper.expanded .item-beschrijving {
    max-height: 300px;
}

.item-beschrijving-wrapper .read-more-toggle {
    display: none;
    font-size: 0.75em;
    color: #4A90E2;
    cursor: pointer;
    margin-top: 2px;
}

.item-beschrijving-wrapper .read-more-toggle:hover {
    text-decoration: underline;
}

.item-beschrijving-wrapper.has-overflow .read-more-toggle {
    display: inline-block;
}

.item-beschrijving-wrapper.expanded .read-more-toggle {
    display: inline-block;
}

.item-card:hover {
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.item-card.dragging {
    opacity: 0.5;
}

.item-foto-small {
    width: 100%;
    height: 80px;
    overflow: hidden;
    border-radius: 4px;
    background: #f0f0f0;
    margin-bottom: 8px;
}

.item-foto-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-content {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 8px;
}

.item-content strong {
    flex: 1;
    color: #1a1a1a;
    font-size: 0.9em;
}

.item-notes-indicator {
    font-size: 0.8em;
}

.item-actions {
    display: flex;
    gap: 5px;
    justify-content: flex-end;
}

.btn-edit-small {
    background: #666;
    color: white;
    border: none;
    padding: 3px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.8em;
    transition: background 0.2s;
}

.btn-edit-small:hover {
    background: #444;
}

.btn-link-small {
    background: #4A90E2;
    color: white;
    border: none;
    padding: 3px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.8em;
    transition: background 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-link-small:hover {
    background: #357ABD;
}

.dagen-blocks {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 0 0 30%;
    max-width: 30%;
}

.dag-block {
    background: white;
    border: 1px solid #d0d0d0;
    border-left: 4px solid #4A90E2;
    border-radius: 6px;
    padding: 12px;
    min-height: 120px;
    width: 100%;
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
    cursor: pointer;
    position: relative;
}

.dag-block:hover {
    border-color: #999;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.dag-block.drag-over {
    background-color: #f0f8ff;
    border-color: #4A90E2;
    border-width: 3px;
    box-shadow: 0 4px 10px rgba(74, 144, 226, 0.3);
    transform: scale(1.02);
}

.dag-block.drop-success {
    background-color: #e8f5e9;
    border-color: #50C878;
    animation: dropPulse 0.6s ease-out;
}

@keyframes dropPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(80, 200, 120, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(80, 200, 120, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(80, 200, 120, 0);
    }
}

.dag-block-header {
    margin: -12px -12px 10px -12px;
    padding: 8px 12px;
    border-radius: 6px 6px 0 0;
}

.dag-block-header h4 {
    margin: 0;
    color: white;
    font-size: 0.9em;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.dag-block-content {
    min-height: 60px;
}

.dag-placeholder {
    color: #999;
    font-size: 0.85em;
    font-style: italic;
    margin: 0;
    text-align: center;
    padding: 10px 0;
}

.dag-items-list {
    list-style: none;
    padding: 0;
    margin: 0 0 10px 0;
}

.dag-item {
    background: #f0f0f0;
    padding: 8px;
    margin-bottom: 6px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

/* Kleine foto thumbnail achteraan in dag items */
.dag-item-foto-thumb {
    width: 24px;
    height: 24px;
    min-width: 24px;
    background-size: cover;
    background-position: center;
    border-radius: 3px;
    flex-shrink: 0;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s, transform 0.2s;
    margin-left: auto;
}

.dag-item-foto-thumb:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Foto overlay */
.foto-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    cursor: pointer;
    animation: fadeIn 0.2s ease;
}

.foto-overlay img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.foto-overlay-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.foto-overlay-close:hover {
    opacity: 1;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
    border-radius: 4px;
    border-left: 3px solid #666;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s, background 0.2s, box-shadow 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.dag-item:hover {
    background: #e8e8e8;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.dag-item-content strong {
    display: block;
    word-break: break-word;
}

.dag-item-content p {
    margin: 4px 0 0 0;
    font-size: 0.85em;
    color: #666;
}

/* Beschrijving met read more */
.dag-item-beschrijving-wrapper {
    position: relative;
}

.dag-item-beschrijving {
    margin: 4px 0 0 0;
    font-size: 0.85em;
    color: #666;
    max-height: 2.6em;
    overflow: hidden;
    transition: max-height 0.3s ease;
    line-height: 1.3;
}

.dag-item-beschrijving-wrapper.expanded .dag-item-beschrijving {
    max-height: 500px;
}

.read-more-toggle {
    display: none;
    font-size: 0.8em;
    color: #4A90E2;
    cursor: pointer;
    margin-top: 2px;
}

.read-more-toggle:hover {
    text-decoration: underline;
}

.dag-item-beschrijving-wrapper.has-overflow .read-more-toggle {
    display: inline-block;
}

.dag-item-beschrijving-wrapper.expanded .read-more-toggle {
    display: inline-block;
}

.dag-item-link {
    flex-shrink: 0;
    font-size: 0.7em;
    padding: 2px 6px;
}

.dag-item:hover {
    transform: translateX(2px);
}

.dag-item.dragging {
    opacity: 0.5;
}

.dag-item strong {
    display: block;
    color: #1a1a1a;
    font-size: 0.9em;
    margin-bottom: 3px;
}

.dag-item p {
    color: #666;
    font-size: 0.85em;
    margin: 0;
}

.btn-add-item {
    background: #666;
    color: white;
    border: none;
    padding: 6px 12px;
    font-size: 0.8em;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    margin-top: 8px;
    transition: background 0.2s;
}

.btn-add-item:hover {
    background: #444;
}

.btn-add-item-small {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #666;
    color: white;
    border: none;
    padding: 4px 8px;
    font-size: 0.9em;
    border-radius: 4px;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 10;
}

.btn-add-item-small:hover {
    background: #444;
}

.form-group textarea {
    width: 100%;
    padding: 8px 10px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: inherit;
    transition: border-color 0.3s;
    background: white;
    resize: vertical;
}

.form-group textarea:focus {
    outline: none;
    border-color: #1a1a1a;
}

.reisdeel-actions {
    display: flex;
    gap: 5px;
    flex-shrink: 0;
}

.btn-edit {
    background: #666;
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background 0.2s;
}

.btn-edit:hover {
    background: #444;
}

.btn-delete-small {
    background: #666;
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.2em;
    line-height: 1;
    transition: background 0.2s;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-delete-small:hover {
    background: #444;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 5px;
    }

    header {
        padding: 8px 15px;
    }

    header h1 {
        font-size: 3em;
    }

    section {
        padding: 12px 15px;
    }

    .calendar-table {
        font-size: 0.8em;
    }

    .calendar-table td {
        padding: 4px 2px;
    }

    .modal-content {
        width: 95%;
        margin: 10px;
    }

    .btn-plus {
        width: 35px;
        height: 35px;
        font-size: 1.3em;
    }
}

/* Item Labels */
.item-label-badge {
    position: absolute;
    top: -5px;
    left: -5px;
    font-size: 0.9em;
    background: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    z-index: 1;
}

.item-card {
    position: relative;
}

.dag-item-label {
    font-size: 0.85em;
    flex-shrink: 0;
    line-height: 1.4;
}

/* Label kleuren via border en achtergrond */
.item-card.label-activity {
    border-left: 3px solid #4CAF50;
    background: #E8F5E9;
}

.item-card.label-sightseeing {
    border-left: 3px solid #2196F3;
    background: #E3F2FD;
}

.item-card.label-resto {
    border-left: 3px solid #FF9800;
    background: #FFF3E0;
}

.dag-item.label-activity {
    border-left-color: #4CAF50 !important;
    background: #E8F5E9 !important;
}

.dag-item.label-sightseeing {
    border-left-color: #2196F3 !important;
    background: #E3F2FD !important;
}

.dag-item.label-resto {
    border-left-color: #FF9800 !important;
    background: #FFF3E0 !important;
}

.item-card.label-extrainfo {
    border-left: 3px solid #9C27B0;
    background: #F3E5F5;
}

.dag-item.label-extrainfo {
    border-left-color: #9C27B0 !important;
    background: #F3E5F5 !important;
}

/* Form select styling */
.form-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    background: white;
    cursor: pointer;
}

.form-select:focus {
    outline: none;
    border-color: #666;
}

/* Reistijd indicator tussen reisdelen */
.reistijd-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 0;
    transition: transform 0.2s ease;
}

.reistijd-indicator:hover {
    transform: scale(1.02);
}

.reistijd-indicator:hover .reistijd-badge {
    border-color: #999;
    background: #eee;
}

.reistijd-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ccc 20%, #ccc 80%, transparent);
    max-width: 100px;
}

.reistijd-badge {
    background: #f5f5f5;
    border: 2px solid #ddd;
    border-radius: 20px;
    padding: 6px 15px;
    font-size: 0.9em;
    color: #666;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}

.reistijd-badge.reistijd-empty {
    border-style: dashed;
    color: #999;
    font-style: italic;
    font-size: 0.85em;
}

.rit-tijd {
    color: #888;
    font-size: 0.9em;
    margin-left: 5px;
}

.rit-kaart-link {
    display: inline-block;
    margin-left: 10px;
    padding: 0.35rem 0.75rem;
    background: #4ade80;
    color: #0a0a0a;
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
    text-transform: lowercase;
    letter-spacing: 0.04em;
    border-radius: 999px;
    vertical-align: middle;
    transition: background 0.15s, transform 0.15s;
}

.rit-kaart-link:hover {
    background: #3dd070;
    transform: scale(1.04);
    opacity: 1;
}

/* Dag item drag & drop herordening */
.dag-item {
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    cursor: grab;
}

.dag-item:active {
    cursor: grabbing;
}

.dag-item.dragging {
    opacity: 0.5;
    transform: scale(0.98);
}

.dag-item.drag-over-item {
    background-color: rgba(74, 144, 226, 0.1);
    box-shadow: 0 -2px 0 0 #4A90E2;
}

.dag-items-list {
    min-height: 20px;
}

/* Touch device drag support */
.dag-item[draggable="true"],
.item-card[draggable="true"] {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    touch-action: none;
}

.dag-item.touch-dragging,
.item-card.touch-dragging {
    opacity: 0.8;
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0,0,0,0.25);
    z-index: 1000;
    position: relative;
}

.touch-drag-placeholder {
    background: rgba(74, 144, 226, 0.2) !important;
    border: 2px dashed #4A90E2 !important;
    min-height: 50px;
}

/* Foto Upload Styling */
.foto-upload-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.foto-preview {
    width: 100%;
    height: 160px;
    border: 2px dashed #ddd;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    transition: all 0.3s ease;
}

.foto-preview:hover {
    border-color: #4A90E2;
    background: linear-gradient(135deg, #f0f7ff 0%, #e3f0ff 100%);
}

.foto-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.foto-placeholder {
    color: #999;
    font-size: 1.1rem;
}

.foto-loading {
    color: #4A90E2;
    font-size: 1.1rem;
    animation: pulse 1.5s ease-in-out infinite;
}

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

.foto-upload-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-upload {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    flex: 1;
    min-width: 100px;
}

.btn-upload:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-upload.btn-camera {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.btn-upload.btn-camera:hover {
    box-shadow: 0 4px 12px rgba(17, 153, 142, 0.4);
}

.btn-upload.btn-remove {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
    flex: 0;
    min-width: auto;
    padding: 10px 14px;
}

.btn-upload.btn-remove:hover {
    box-shadow: 0 4px 12px rgba(235, 51, 73, 0.4);
}

/* Responsive foto upload */
@media (max-width: 480px) {
    .foto-preview {
        height: 140px;
    }
    
    .btn-upload {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
}

/* Mobile Tabs */
.mobile-tabs {
    display: none;
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
    padding: 0;
}

.mobile-tab {
    flex: 1;
    padding: 14px 16px;
    border: none;
    background: transparent;
    font-size: 0.95rem;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
}

.mobile-tab.active {
    color: #4A90E2;
    background: white;
    border-bottom-color: #4A90E2;
}

.mobile-tab:hover:not(.active) {
    background: rgba(74, 144, 226, 0.05);
}

/* Mobile Responsive Layout */
@media (max-width: 768px) {
    /* Voorkom horizontaal scrollen */
    body {
        overflow-x: hidden;
    }
    
    .container,
    .reisdelen-overzicht,
    .reisdelen-panels {
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .mobile-tabs {
        display: flex;
    }
    
    .reisdeel-content-wrapper {
        flex-direction: column;
        gap: 0;
        padding: 10px;
    }
    
    .dagen-blocks {
        flex: none;
        max-width: 100%;
        width: 100%;
    }
    
    .items-kolom {
        min-width: 100%;
        width: 100%;
        margin-top: 0;
    }
    
    /* Default: items kolom verborgen op mobiel (kalender is actief) */
    .items-kolom[data-content="items"] {
        display: none;
    }
    
    /* Hidden class for mobile tab switching */
    .mobile-hidden {
        display: none !important;
    }
    
    /* Show class for mobile tab switching */
    .mobile-visible {
        display: block !important;
    }
    
    /* Dag blocks full width on mobile */
    .dag-block {
        width: 100%;
    }
    
    /* Items list responsive */
    .items-list {
        grid-template-columns: 1fr;
    }
    
    /* Reisdeel panel */
    .reisdeel-panel {
        max-width: 100%;
        overflow: hidden;
    }
    
    /* Reisdeel panel header adjustments */
    .reisdeel-panel-header {
        flex-direction: column;
        align-items: stretch;
        padding: 10px;
        gap: 10px;
    }
    
    .reisdeel-panel-header-content {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    
    .reisdeel-panel-title h3 {
        font-size: 1.3rem;
    }
    
    .reisdeel-panel-info {
        font-size: 0.85rem;
    }
    
    /* Hotel info panel - volledig responsive */
    .hotel-info-panel-header {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        max-width: 100%;
        min-height: auto;
        padding: 10px;
        box-sizing: border-box;
    }
    
    .hotel-foto-small {
        width: 100%;
        height: 120px;
        margin-bottom: 8px;
    }
    
    .hotel-details-small {
        width: 100%;
    }
    
    .hotel-name-small {
        font-size: 0.95rem;
    }
    
    .hotel-price-small {
        font-size: 0.85rem;
        flex-wrap: wrap;
    }
    
    /* Hotel info compact */
    .hotel-info {
        flex-direction: column;
        gap: 5px;
        padding: 8px 10px;
    }
    
    /* Actions buttons */
    .reisdeel-actions {
        position: static;
        margin-top: 10px;
        display: flex;
        justify-content: flex-end;
        gap: 5px;
        width: 100%;
    }
    
    .reisdeel-actions button {
        padding: 8px 12px;
    }
    
    /* Rit indicator responsive */
    .reistijd-indicator {
        margin: 10px 0;
    }
    
    .reistijd-badge {
        font-size: 0.85rem;
        padding: 6px 12px;
        max-width: 100%;
        text-align: center;
    }
    
    /* Modals responsive */
    .modal {
        padding: 10px;
    }
    
    .modal-content {
        width: 100%;
        max-width: 100%;
        margin: 0;
        border-radius: 12px;
        max-height: 95vh;
    }
    
    .modal-header {
        padding: 12px 15px;
    }
    
    .modal-header h2 {
        font-size: 1.1rem;
    }
    
    .modal-content .reis-form {
        padding: 15px;
    }
    
    .form-group {
        margin-bottom: 12px;
    }
    
    .form-group label {
        font-size: 0.9rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Voorkomt zoom op iOS */
        padding: 10px;
    }
    
    /* Foto upload responsive */
    .foto-upload-actions {
        flex-direction: column;
    }
    
    .btn-upload {
        width: 100%;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .mobile-tab {
        padding: 12px 10px;
        font-size: 0.85rem;
    }
    
    .reisdeel-panel {
        margin: 0 -10px;
        border-radius: 0;
    }
    
    .reisdeel-panel-header {
        padding: 8px;
    }
    
    .reisdeel-panel-title h3 {
        font-size: 3rem;
        text-align: center;
    }
    
    .dag-block-header h4 {
        font-size: 0.9rem;
    }
    
    .dag-item {
        padding: 8px 10px;
    }
    
    /* Hotel nog compacter */
    .hotel-info-panel-header {
        padding: 8px;
    }
    
    .hotel-foto-small {
        height: 100px;
    }
    
    .hotel-name-small {
        font-size: 0.9rem;
    }
    
    /* Header compacter */
    header {
        padding: 15px 10px;
    }
    
    header h1 {
        font-size: 3rem;
    }
    
    /* Content wrapper padding */
    .reisdeel-content-wrapper {
        padding: 8px;
    }
    
    /* Modal nog compacter */
    .modal {
        padding: 5px;
    }
    
    .modal-content {
        border-radius: 8px;
    }
    
    .modal-content .reis-form {
        padding: 12px;
    }
    
    .modal-header {
        padding: 10px 12px;
    }
    
    .modal-header h2 {
        font-size: 1rem;
    }
    
    /* Buttons in modal */
    .btn-primary,
    .btn-secondary,
    .btn-delete {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
}

