/* 
 * Boek-nu Module CSS
 * Basis styling voor booking formulieren
 * Later integreren met thivarental.be huisstijl
 */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    margin: 0;
    padding: 0px;
}

/* Container */
.booking-container {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Headings */
h1 {
    color: #2c3e50;
    margin-top: 0;
    font-size: 28px;
    border-bottom: 3px solid #3498db;
    padding-bottom: 10px;
}

h2 {
    color: #34495e;
    font-size: 22px;
    margin-top: 30px;
}

h3 {
    color: #34495e;
    font-size: 18px;
    margin-top: 20px;
}

/* Form Cards */
.form-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Vehicle Selection Grid */
.vehicle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.vehicle-card {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
}

.vehicle-card:hover {
    border-color: #3498db;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
    transform: translateY(-2px);
}

.vehicle-card.selected {
    border-color: #27ae60;
    box-shadow: 0 4px 16px rgba(39, 174, 96, 0.3);
    background: #f0fdf4;
}

.vehicle-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vehicle-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vehicle-placeholder {
    color: #adb5bd;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vehicle-info {
    padding: 15px;
}

.vehicle-info h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    color: #2c3e50;
}

.vehicle-category {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #7f8c8d;
}

.vehicle-seats {
    margin: 0;
    font-size: 14px;
    color: #555;
    display: flex;
    align-items: center;
    gap: 5px;
}

.vehicle-seats svg {
    flex-shrink: 0;
}

.vehicle-select-btn {
    padding: 0 15px 15px 15px;
}

.btn-select-vehicle {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 4px;
    background: #3498db;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-select-vehicle:hover {
    background: #2980b9;
}

.vehicle-card.selected .btn-select-vehicle {
    background: #27ae60;
}

.vehicle-card.selected .btn-select-vehicle:hover {
    background: #229954;
}

/* Form Sections */
.form-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.form-section:last-of-type {
    border-bottom: none;
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    gap: 20px;
}

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

label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #2c3e50;
}

/* Form Inputs */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.3s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

textarea {
    resize: vertical;
}

/* Option Items */
.option-item {
    padding: 10px;
    background: #f9f9f9;
    border-radius: 4px;
    margin-bottom: 10px;
}

.option-item.option-unavailable {
    background: #f8d7da;
    opacity: 0.6;
}

.option-item.option-unavailable label {
    cursor: not-allowed;
}

.option-item label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: normal;
    margin: 0;
}

.option-name {
    flex: 1;
}

.option-stock {
    display: block;
    font-size: 12px;
    font-weight: normal;
    margin-top: 4px;
}

.option-quantity {
    width: 80px !important;
    flex-shrink: 0;
}

.option-price {
    margin-left: auto;
    font-weight: 600;
    color: #27ae60;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
}

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

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-large {
    padding: 16px 32px;
    font-size: 18px;
}

/* Form Actions */
.form-actions {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 4px;
    border-left: 4px solid;
}

.alert ul {
    margin: 0;
    padding-left: 20px;
}

.alert-error {
    background-color: #fee;
    border-left-color: #e74c3c;
    color: #c0392b;
}

.alert-success {
    background-color: #d4edda;
    border-left-color: #28a745;
    color: #155724;
}

.alert-info {
    background-color: #d1ecf1;
    border-left-color: #17a2b8;
    color: #0c5460;
}

.alert h1 {
    margin-top: 0;
    font-size: 22px;
    border: none;
    padding: 0;
    color: inherit;
}

/* Form Errors */
.form-error {
    display: block;
    color: #e74c3c;
    font-size: 14px;
    margin-top: 5px;
}

/* Price Summary */
.price-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 4px;
    margin-top: 20px;
}

.price-summary h3 {
    margin-top: 0;
}

.price-table {
    width: 100%;
    margin-top: 15px;
}

.price-table td {
    padding: 8px 0;
}

.price-table td:last-child {
    text-align: right;
}

.total-row {
    border-top: 2px solid #ddd;
    font-size: 18px;
}

.total-row td {
    padding-top: 15px;
}

/* Booking Summary */
.booking-summary {
    background: #ecf0f1;
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 25px;
}

.booking-summary h2 {
    margin-top: 0;
    font-size: 18px;
}

.booking-summary p {
    margin: 8px 0;
}

/* Booking Details */
.booking-details {
    margin-top: 30px;
}

.details-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.details-table th,
.details-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.details-table th {
    font-weight: 600;
    width: 180px;
    color: #555;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-confirmed {
    background-color: #d4edda;
    color: #155724;
}

.status-cancelled {
    background-color: #f8d7da;
    color: #721c24;
}

/* Payment Section */
.payment-section {
    background: #fffbea;
    padding: 20px;
    border-radius: 4px;
    border: 2px solid #f39c12;
    margin-top: 30px;
}

.payment-section h2 {
    margin-top: 0;
    color: #d68910;
}

/* Notes */
.note {
    font-size: 14px;
    color: #666;
    font-style: italic;
    margin-top: 15px;
}

/* Responsive */
@media (max-width: 768px) {
    .booking-container {
        padding: 20px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

/* Payment Options & Terms - NEW */
.radio-group {
    margin: 15px 0;
}

.radio-option {
    display: block;
    padding: 15px;
    margin-bottom: 10px;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.radio-option:hover {
    border-color: #3498db;
    background-color: #f8f9fa;
}

.radio-option input[type="radio"] {
    margin-right: 10px;
    vertical-align: middle;
}

.radio-option input[type="radio"]:checked + .radio-content {
    font-weight: bold;
}

.radio-option:has(input:checked) {
    border-color: #3498db;
    background-color: #e3f2fd;
}

.radio-content {
    display: inline-block;
    width: calc(100% - 30px);
    vertical-align: middle;
}

.radio-content strong {
    display: block;
    font-size: 16px;
    color: #2c3e50;
}

.radio-content .amount {
    display: block;
    font-size: 20px;
    color: #27ae60;
    font-weight: bold;
    margin: 5px 0;
}

.radio-content .note {
    font-size: 13px;
    color: #666;
    margin: 5px 0 0 0;
}

.checkbox-label {
    display: block;
    padding: 15px;
    background-color: #fff9e6;
    border: 2px solid #ffc107;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.6;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 8px;
    vertical-align: middle;
}

.checkbox-label .required {
    color: #e74c3c;
    font-weight: bold;
    margin-left: 3px;
}

.terms-link {
    color: #3498db;
    text-decoration: underline;
    font-weight: bold;
}

.terms-link:hover {
    color: #2980b9;
}

.total-row th,
.total-row td {
    font-size: 18px;
    padding-top: 10px;
    border-top: 2px solid #333;
}

/* Terms Page */
.container {
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.container h1 {
    color: #2c3e50;
    border-bottom: 3px solid #3498db;
    padding-bottom: 10px;
}

.container h2 {
    color: #34495e;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.container h3 {
    color: #555;
    margin-top: 20px;
}

.container ul {
    line-height: 1.8;
}

.container hr {
    margin: 40px 0;
    border: none;
    border-top: 2px solid #ddd;
}

.last-updated {
    color: #999;
    font-size: 14px;
    font-style: italic;
}

.text-center {
    text-align: center;
}

/* ============================================
   BOOKING PROGRESS INDICATOR
   ============================================ */
.booking-progress {
    margin: 2rem 0;
    padding: 0;
}

.progress-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
}

.progress-line {
    position: absolute;
    top: 25px;
    left: 10%;
    right: 10%;
    height: 3px;
    background: #e0e0e0;
    z-index: 0;
}

.progress-line-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

.progress-step {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    text-align: center;
}

.step-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    border: 3px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.progress-step.completed .step-circle {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
}

.progress-step.active .step-circle {
    border-color: #667eea;
    border-width: 4px;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
    transform: scale(1.1);
}

.progress-step.pending .step-circle {
    background: #f5f5f5;
    border-color: #e0e0e0;
}

.step-title {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
    max-width: 100px;
}

.progress-step.active .step-title {
    color: #667eea;
    font-weight: 600;
}

.progress-step.completed .step-title {
    color: #2d3436;
}

/* ============================================
   VISUAL CALENDAR SELECTOR
   ============================================ */
.calendar-selector {
    margin-top: 2rem;
    display: none;
}

.calendar-selector.show {
    display: block;
}

.calendar-widget {
    transition: all 0.3s ease;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    margin-bottom: 1rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.calendar-header h3 {
    margin: 0;
    color: white;
    font-size: 1.1rem;
}

.calendar-nav {
    display: flex;
    gap: 1rem;
}

.calendar-nav button {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.calendar-nav button:hover:not(:disabled) {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

.calendar-nav button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    margin-bottom: 1.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    padding: 0.3rem;
    min-height: 60px;
}

.calendar-day .day-number {
    font-size: 1rem;
    line-height: 1.2;
}

.calendar-day .day-status {
    font-size: 0.65rem;
    margin-top: 2px;
    line-height: 1;
}

.calendar-day.header {
    background: #f8f9fa;
    color: #636e72;
    cursor: default;
    font-weight: 700;
    font-size: 0.85rem;
    min-height: 40px;
}

.calendar-day.empty {
    background: transparent;
    cursor: default;
}

.calendar-day.past {
    background: #ecf0f1;
    color: #95a5a6;
    cursor: not-allowed;
    opacity: 0.5;
}

.calendar-day.available {
    background: #d4edda;
    color: #155724;
    border: 3px solid #28a745;
}

.calendar-day.available:hover {
    background: #28a745;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(40, 167, 69, 0.4);
}

.calendar-day.booked {
    background: #f8d7da;
    color: #721c24;
    border: 3px solid #dc3545;
    cursor: not-allowed;
}

.calendar-day.selected {
    background: #fff3cd !important;
    border: 3px solid #ffc107 !important;
    color: #856404 !important;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.5);
}

.calendar-day.in-range {
    background: #cfe2ff !important;
    border: 3px solid #0d6efd !important;
    color: #084298 !important;
}

.selected-dates-display {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1rem 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.date-display-box {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
    text-align: center;
    transition: all 0.3s ease;
}

.date-display-box.clickable {
    cursor: pointer;
}

.date-display-box.clickable:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.date-display-box.filled {
    background: #d4edda;
    border-color: #28a745;
    border-style: solid;
}

.date-display-box.filled.clickable:hover {
    background: #c3e6cb;
    border-color: #1e7e34;
}

.date-display-box h4 {
    margin: 0 0 0.3rem 0;
    font-size: 0.8rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.date-display-box .date-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: #2d3436;
}

.calendar-legend {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
    flex-wrap: wrap;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
}

.legend-box {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    flex-shrink: 0;
}

/* Hidden date inputs for form submission */
.hidden-date-inputs {
    display: none;
}

/* ============================================
   DOCUMENT UPLOAD STYLING
   ============================================ */
.upload-section {
    margin-bottom: 30px;
}

.upload-group {
    margin-bottom: 25px;
    padding: 20px;
    background: #fafafa;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

.upload-group h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 18px;
}

.file-input-wrapper {
    margin-bottom: 15px;
}

.file-input-wrapper label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

.file-input-wrapper input[type="file"] {
    display: block;
    width: 100%;
    padding: 10px;
    border: 2px dashed #ccc;
    border-radius: 4px;
    background: white;
    cursor: pointer;
}

.file-input-wrapper input[type="file"]:hover {
    border-color: #007bff;
}

.info-box {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.info-box h4 {
    margin-bottom: 10px;
}

.info-box ul {
    margin-left: 20px;
}

.info-box li {
    margin: 5px 0;
}

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

.alert-warning {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
}

.alert h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

.alert p.small,
.small {
    font-size: 14px;
    margin-top: 10px;
    color: #666;
}

.button-group {
    margin-top: 30px;
    text-align: center;
}

.btn-secondary {
    background: #6c757d;
    margin-left: 10px;
}

.btn-secondary:hover {
    background: #545b62;
}

.booking-info {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 30px;
}

.booking-info p {
    margin: 5px 0;
    color: #666;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .progress-container {
        padding: 0 0.5rem;
    }
    
    .step-circle {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .step-title {
        font-size: 0.7rem;
        max-width: 70px;
    }
    
    .progress-line {
        left: 8%;
        right: 8%;
    }
    
    /* Compactere voertuig grid op mobiel */
    .vehicle-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .vehicle-image {
        height: 150px;
    }
    
    /* Compactere kalender op mobiel */
    .calendar-header {
        padding: 0.5rem 0.75rem;
        margin-bottom: 0.75rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .calendar-header h3 {
        font-size: 1rem;
    }
    
    .calendar-nav {
        gap: 0.5rem;
    }
    
    .calendar-nav button {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .calendar-grid {
        gap: 3px;
        max-width: 100%;
    }
    
    .calendar-day {
        font-size: 0.7rem;
        min-height: 45px;
        padding: 0.2rem;
        border-radius: 4px;
    }
    
    .calendar-day .day-number {
        font-size: 0.85rem;
    }
    
    .calendar-day .day-status {
        font-size: 0.55rem;
        margin-top: 1px;
    }
    
    .calendar-day.header {
        min-height: 30px;
        font-size: 0.7rem;
    }
    
    .calendar-day.available,
    .calendar-day.booked,
    .calendar-day.selected {
        border-width: 2px;
    }
    
    .selected-dates-display {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        margin: 0.75rem 0;
    }
    
    .date-display-box {
        padding: 0.75rem;
    }
    
    .date-display-box h4 {
        font-size: 0.7rem;
        margin-bottom: 0.2rem;
    }
    
    .date-display-box .date-value {
        font-size: 1rem;
    }
    
    .calendar-legend {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.5rem;
        font-size: 0.75rem;
    }
    
    .legend-item {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    
    .legend-box {
        width: 20px !important;
        height: 20px !important;
        flex-shrink: 0;
    }
    
    /* Compactere form elementen */
    .form-card {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .form-card h2 {
        font-size: 1.2rem;
        margin-top: 0;
        margin-bottom: 15px;
    }
}

/* Extra small screens (e.g. iPhone SE, older Androids) */
@media (max-width: 400px) {
    .booking-container {
        padding: 8px;
    }
    
    .form-card {
        padding: 8px;
        overflow-x: hidden;
    }
    
    /* Auto-scale calendar to fit tight screens */
    .calendar-widget {
        transform: scale(0.85);
        transform-origin: top center;
        width: 117%; /* Compensate for scale down */
        margin-left: -8.5%; /* Center the scaled element */
        margin-bottom: -15%; /* Reduce bottom gap */
    }
    
    .calendar-day {
        min-height: 30px;
        font-size: 0.65rem;
        padding: 1px;
    }
    
    .calendar-day .day-status {
        display: none; /* Hide status text on very small screens */
    }
    
    .calendar-grid {
        gap: 1px;
    }
    
    .calendar-header {
        padding: 0.3rem;
    }
    
    .calendar-header h3 {
        font-size: 0.8rem;
    }
    
    .calendar-nav button {
        padding: 0.2rem 0.4rem;
        font-size: 0.7rem;
    }
    
    .vehicle-image {
        height: 120px;
    }
}

