/* Care Booking System - Public Styles - ULTRA COMPACT */

.cbs-booking-container {
    max-width: 450px;
    margin: 0 auto;
    padding: 15px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Messages */
.cbs-message {
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 13px;
}

.cbs-message-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

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

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

/* Filters */
.cbs-filters {
    margin-bottom: 20px;
}

.cbs-filter-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
}

.cbs-filter-group label {
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
    font-size: 13px;
}

.cbs-select {
    padding: 8px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    background-color: white;
    transition: border-color 0.3s;
}

.cbs-select:hover,
.cbs-select:focus {
    border-color: #4CAF50;
    outline: none;
}

/* Calendar - ULTRA COMPACT */
.cbs-calendar-container {
    background: white;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 12px;
    margin-bottom: 20px;
}

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

.cbs-current-month {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.cbs-nav-button {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s;
}

.cbs-nav-button:hover {
    background: #45a049;
}

.cbs-hint {
    margin-top: 8px;
    padding: 6px;
    background: #e8f5e9;
    border-left: 3px solid #4CAF50;
    color: #2e7d32;
    font-size: 10px;
}

.cbs-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    max-width: 100%;
}

.cbs-day-header {
    text-align: center;
    font-weight: 600;
    padding: 3px;
    background: #f5f5f5;
    border-radius: 2px;
    color: #666;
    font-size: 9px;
}

/* SEHR KLEINE Tagesfelder */
.cbs-calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e0e0e0;
    border-radius: 2px;
    cursor: default;
    font-weight: 500;
    transition: all 0.2s;
    font-size: 9px;
    max-width: 50px;
    max-height: 50px;
    min-height: 18px;
    position: relative;
}

.cbs-calendar-day.cbs-empty {
    border: none;
    background: transparent;
}

.cbs-calendar-day.cbs-past {
    color: #ccc;
    background: #f9f9f9;
}

/* Farbcodierung */
.cbs-calendar-day.cbs-available {
    cursor: pointer;
    border-color: #4CAF50;
}

.cbs-calendar-day.cbs-available[data-booking-count="0"] {
    background: #c8e6c9;
    color: #1b5e20;
}

.cbs-calendar-day.cbs-available.cbs-has-bookings {
    background: #fff9c4;
    color: #f57f17;
    border-color: #fbc02d;
}

.cbs-calendar-day.cbs-full {
    background: #ffcdd2;
    color: #c62828;
    border-color: #e53935;
    cursor: not-allowed;
}

.cbs-calendar-day.cbs-available:hover:not(.cbs-full) {
    transform: scale(1.15);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 10;
}

.cbs-calendar-day.cbs-selected {
    background: #4CAF50 !important;
    color: white !important;
    border-color: #2e7d32 !important;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(76, 175, 80, 0.4);
}

/* Start- und Enddatum Markierung */
.cbs-calendar-day.cbs-start-date::before {
    content: 'S';
    position: absolute;
    top: 1px;
    left: 2px;
    font-size: 6px;
    font-weight: bold;
    color: white;
    background: #2e7d32;
    border-radius: 50%;
    width: 10px;
    height: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cbs-calendar-day.cbs-end-date::after {
    content: 'E';
    position: absolute;
    top: 1px;
    right: 2px;
    font-size: 6px;
    font-weight: bold;
    color: white;
    background: #c62828;
    border-radius: 50%;
    width: 10px;
    height: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cbs-calendar-day.cbs-unavailable {
    background: #fafafa;
    color: #999;
}

/* Legende - KOMPAKT */
.cbs-legend {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    font-size: 9px;
    flex-wrap: wrap;
    justify-content: center;
}

.cbs-legend-item {
    display: flex;
    align-items: center;
    gap: 3px;
}

.cbs-legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    border: 1px solid #ddd;
}

.cbs-legend-color.free {
    background: #c8e6c9;
}

.cbs-legend-color.partial {
    background: #fff9c4;
}

.cbs-legend-color.full {
    background: #ffcdd2;
}

/* Selected Dates Display */
.cbs-selected-dates {
    background: white;
    padding: 15px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.cbs-selected-dates h3 {
    margin-top: 0;
    margin-bottom: 12px;
    color: #333;
    font-size: 15px;
}

.cbs-instruction {
    background: #e3f2fd;
    padding: 12px;
    border-left: 4px solid #2196F3;
    border-radius: 4px;
    color: #1565C0;
    margin: 0;
    font-size: 12px;
    line-height: 1.6;
}

.cbs-date-selection-status {
    background: #fff9c4;
    padding: 12px;
    border-left: 4px solid #fbc02d;
    border-radius: 4px;
}

.cbs-date-selection-status p {
    margin: 5px 0;
    font-size: 13px;
}

.cbs-next-step {
    color: #f57f17;
    font-weight: 600;
}

.cbs-date-selection-complete {
    background: #e8f5e9;
    padding: 15px;
    border-left: 4px solid #4CAF50;
    border-radius: 4px;
}

.cbs-date-range-display {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
    font-weight: 600;
    font-size: 13px;
}

.cbs-range-start {
    color: #2e7d32;
}

.cbs-range-arrow {
    color: #4CAF50;
    font-size: 18px;
}

.cbs-range-end {
    color: #c62828;
}

.cbs-dates-list {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
}

.cbs-dates-list li {
    background: white;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #4CAF50;
    color: #2e7d32;
    font-weight: 500;
    font-size: 11px;
}

/* Continue Button */
.cbs-continue-button {
    background: #2196F3;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

.cbs-continue-button:hover {
    background: #1976D2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}

.cbs-continue-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Booking Form */
.cbs-booking-form {
    background: white;
    padding: 20px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.cbs-booking-form h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 16px;
}

.cbs-form-group {
    margin-bottom: 15px;
}

.cbs-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #333;
    font-size: 13px;
}

.cbs-form-group input,
.cbs-form-group textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.cbs-form-group input:focus,
.cbs-form-group textarea:focus {
    border-color: #4CAF50;
    outline: none;
}

.cbs-submit-button {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 100%;
}

.cbs-submit-button:hover {
    background: #45a049;
}

.cbs-submit-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cbs-booking-container {
        padding: 10px;
        max-width: 100%;
    }
    
    .cbs-calendar-container {
        padding: 10px;
    }
    
    .cbs-calendar-grid {
        gap: 1px;
    }
    
    .cbs-calendar-day {
        font-size: 8px;
        min-height: 16px;
    }
    
    .cbs-day-header {
        font-size: 8px;
        padding: 2px;
    }
    
    .cbs-current-month {
        font-size: 12px;
    }
    
    .cbs-nav-button {
        padding: 3px 6px;
        font-size: 11px;
    }
    
    .cbs-dates-list {
        grid-template-columns: 1fr;
    }
    
    .cbs-legend {
        font-size: 8px;
    }
}
