/**
 * Custom Booking System Styles
 * Version: 1.1.0
 * Last Updated: 2025-01-27
 */

/* Bestehender CSS-Code bleibt gleich - nur Version ändern */

/* ============================================
   BASIC STYLES
   ============================================ */

.cbs-booking-wrapper {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.cbs-booking-wrapper h2 {
    margin-bottom: 0.5rem;
    font-size: 1.75rem;
}

.cbs-intro {
    color: #666;
    margin-bottom: 2rem;
    text-align: center;
    font-size: 1rem;
    line-height: 1.6;
}

/* ============================================
   PROGRESS STEPS
   ============================================ */

.cbs-progress-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3rem;
    position: relative;
    padding: 0 10%;
}

.cbs-progress-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 15%;
    right: 15%;
    height: 2px;
    background: #e0e0e0;
    z-index: 0;
}

.cbs-progress-steps .step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
    background: #fff;
    padding: 0 10px;
}

.step-number {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #999;
    font-weight: bold;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: #0073aa;
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 0 0 4px rgba(0, 115, 170, 0.2);
}

.step.completed .step-number {
    background: #00a32a;
    color: #fff;
}

.step.completed .step-number::before {
    content: '✓';
    display: block;
}

.step-label {
    display: block;
    font-size: 0.875rem;
    color: #666;
}

.step.active .step-label {
    color: #0073aa;
    font-weight: 600;
}

/* ============================================
   FORM STEPS
   ============================================ */

.form-step {
    animation: fadeIn 0.3s ease;
    min-height: 400px;
}

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

.form-step h3 {
    margin-bottom: 1.5rem;
    color: #333;
    font-size: 1.5rem;
}

/* ============================================
   CALENDAR STYLES
   ============================================ */

.calendar-container {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

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

.calendar-month-year {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    min-width: 200px;
    text-align: center;
}

.btn-month-nav {
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-month-nav:hover {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
    transform: scale(1.1);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 8px;
}

.weekday {
    text-align: center;
    font-weight: 700;
    color: #666;
    font-size: 0.875rem;
    padding: 0.75rem 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    background: #f9f9f9;
    min-height: 60px;
}

.calendar-day .day-number {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    z-index: 1;
}

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

.calendar-day.past {
    opacity: 0.3;
    cursor: not-allowed;
    background: #fafafa;
}

.calendar-day.past .day-number {
    color: #999;
}

.calendar-day.unavailable {
    opacity: 0.5;
    cursor: not-allowed;
    background: #fafafa;
}

.calendar-day.available {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-color: #90caf9;
    cursor: pointer;
}

.calendar-day.available .day-number {
    color: #0d47a1;
}

.calendar-day.available:hover {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    border-color: #1565c0;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}

.calendar-day.available:hover .day-number {
    color: #fff;
}

.calendar-day.available:hover .availability-indicator {
    color: #fff;
}

.calendar-day.today {
    background: linear-gradient(135deg, #fff9c4 0%, #fff59d 100%);
    border-color: #fbc02d;
    font-weight: bold;
}

.calendar-day.today .day-number {
    color: #f57f17;
}

.calendar-day.today.available {
    background: linear-gradient(135deg, #81c784 0%, #66bb6a 100%);
    border-color: #4caf50;
}

.calendar-day.today.available .day-number {
    color: #1b5e20;
}

.calendar-day.today.available:hover {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
}

.calendar-day.today.available:hover .day-number {
    color: #fff;
}

.calendar-day.full {
    background: #f5f5f5;
    opacity: 0.6;
    cursor: not-allowed;
    border-color: #e0e0e0;
}

.calendar-day.full .day-number {
    color: #999;
    text-decoration: line-through;
}

.availability-indicator {
    position: absolute;
    bottom: 6px;
    color: #4caf50;
    font-size: 0.6rem;
    line-height: 1;
    z-index: 1;
}

/* ============================================
   TIME SLOTS
   ============================================ */

.selected-info {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    padding: 1.25rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    font-size: 1.05rem;
    border-left: 4px solid #2196f3;
}

.selected-info strong {
    color: #0d47a1;
}

.timeslot-group {
    margin-bottom: 2.5rem;
}

.timeslot-group h4 {
    margin-bottom: 1rem;
    color: #0073aa;
    font-size: 1.2rem;
    font-weight: 600;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e3f2fd;
}

.time-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.time-slot-btn {
    padding: 1.25rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    text-align: center;
}

.time-slot-btn:hover {
    border-color: #2196f3;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(33, 150, 243, 0.2);
}

.time-slot-btn.selected {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    color: #fff;
    border-color: #1565c0;
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.4);
}

.no-slots {
    text-align: center;
    padding: 3rem;
    color: #666;
    font-style: italic;
    font-size: 1.1rem;
}

/* ============================================
   BOOKING SUMMARY
   ============================================ */

.summary-box {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    border-left: 5px solid #2196f3;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.summary-box h4 {
    margin-bottom: 1.5rem;
    color: #333;
    font-size: 1.3rem;
}

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

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

.summary-item .label {
    font-weight: 600;
    color: #666;
    font-size: 1.05rem;
}

.summary-item .value {
    color: #0d47a1;
    font-weight: 700;
    font-size: 1.1rem;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */

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

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

.form-group input[type="tel"] {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.form-group input[type="tel"]:focus {
    outline: none;
    border-color: #2196f3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.form-group small {
    display: block;
    margin-top: 0.75rem;
    color: #666;
    font-size: 0.875rem;
    line-height: 1.4;
}

.form-group small.success-note {
    color: #2e7d32;
    font-weight: 500;
}

.form-group small.success-note::before {
    content: '✓ ';
    font-weight: bold;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    padding: 1.125rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.4);
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-back {
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 1.5rem;
    transition: all 0.2s ease;
    font-weight: 600;
    color: #666;
}

.btn-back:hover {
    background: #e0e0e0;
    border-color: #bdbdbd;
    color: #333;
}

/* ============================================
   MESSAGES
   ============================================ */

.booking-message {
    display: none;
    margin-top: 2rem;
    padding: 1.25rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    animation: slideIn 0.3s ease;
}

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

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

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

/* ============================================
   SUCCESS SCREEN
   ============================================ */

.booking-success-screen {
    text-align: center;
    padding: 3rem 2rem;
    animation: fadeInScale 0.5s ease;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.success-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 2rem;
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: #fff;
    box-shadow: 0 8px 24px rgba(76, 175, 80, 0.4);
    animation: successPulse 2s ease-in-out infinite;
}

@keyframes successPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.booking-success-screen h2 {
    color: #2e7d32;
    margin-bottom: 1rem;
    font-size: 2rem;
}

.success-message {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.booking-details {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
    border-left: 5px solid #4caf50;
}

.booking-details h3 {
    color: #2e7d32;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.detail-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.detail-item:last-child {
    margin-bottom: 0;
}

.detail-item .icon {
    font-size: 1.5rem;
}

.detail-item .text {
    font-weight: 600;
    color: #333;
}

.next-steps {
    background: #f5f5f5;
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
    text-align: left;
}

.next-steps h3 {
    color: #333;
    margin-bottom: 1rem;
    text-align: center;
}

.next-steps ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.next-steps li {
    padding: 0.75rem 0;
    padding-left: 2rem;
    position: relative;
    color: #666;
    line-height: 1.6;
}

.next-steps li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #4caf50;
    font-weight: bold;
    font-size: 1.2rem;
}

/* ============================================
   SPINNER
   ============================================ */

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   RESPONSIVE - MOBILE
   ============================================ */

@media (max-width: 768px) {
    .cbs-booking-wrapper {
        padding: 1rem;
        margin: 1rem 0.5rem;
        border-radius: 8px;
    }
    
    .cbs-booking-wrapper h2 {
        font-size: 1.5rem;
    }
    
    .cbs-intro {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
    
    .cbs-progress-steps {
        padding: 0 2%;
        margin-bottom: 2rem;
    }
    
    .cbs-progress-steps::before {
        left: 8%;
        right: 8%;
    }
    
    .step-label {
        font-size: 0.7rem;
    }
    
    .step-number {
        width: 32px;
        height: 32px;
        line-height: 32px;
        font-size: 0.9rem;
    }
    
    .form-step {
        min-height: 300px;
    }
    
    .form-step h3 {
        font-size: 1.25rem;
    }
    
    .calendar-container {
        padding: 1rem;
        border-radius: 8px;
    }
    
    .calendar-header {
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
    }
    
    .calendar-month-year {
        font-size: 1.1rem;
        min-width: 140px;
    }
    
    .btn-month-nav {
        width: 36px;
        height: 36px;
        font-size: 1.2rem;
    }
    
    .calendar-weekdays {
        gap: 4px;
    }
    
    .weekday {
        font-size: 0.7rem;
        padding: 0.5rem 0;
        letter-spacing: 0;
    }
    
    .calendar-days {
        gap: 4px;
    }
    
    .calendar-day {
        min-height: 45px;
        border-radius: 6px;
        border-width: 1px;
    }
    
    .calendar-day .day-number {
        font-size: 0.9rem;
    }
    
    .availability-indicator {
        bottom: 4px;
        font-size: 0.5rem;
    }
    
    .selected-info {
        padding: 1rem;
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }
    
    .timeslot-group {
        margin-bottom: 2rem;
    }
    
    .timeslot-group h4 {
        font-size: 1.1rem;
    }
    
    .time-slots-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .time-slot-btn {
        padding: 1rem 0.5rem;
        font-size: 0.85rem;
    }
    
    .summary-box {
        padding: 1.5rem;
    }
    
    .summary-box h4 {
        font-size: 1.2rem;
    }
    
    .summary-item {
        padding: 0.75rem 0;
    }
    
    .summary-item .label,
    .summary-item .value {
        font-size: 0.95rem;
    }
    
    .btn {
        padding: 1rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .booking-success-screen {
        padding: 2rem 1rem;
    }
    
    .success-icon {
        width: 80px;
        height: 80px;
        font-size: 3rem;
        margin-bottom: 1.5rem;
    }
    
    .booking-success-screen h2 {
        font-size: 1.5rem;
    }
    
    .success-message {
        font-size: 1rem;
    }
    
    .booking-details {
        padding: 1.5rem;
    }
    
    .booking-details h3 {
        font-size: 1.2rem;
    }
    
    .detail-item {
        font-size: 1rem;
        padding: 0.75rem;
    }
    
    .next-steps {
        padding: 1.5rem;
    }
    
    .next-steps li {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .cbs-booking-wrapper {
        padding: 0.75rem;
        margin: 0.5rem 0.25rem;
    }
    
    .cbs-booking-wrapper h2 {
        font-size: 1.25rem;
    }
    
    .step-label {
        font-size: 0.65rem;
    }
    
    .calendar-container {
        padding: 0.75rem;
    }
    
    .calendar-month-year {
        font-size: 1rem;
        min-width: 120px;
    }
    
    .btn-month-nav {
        width: 32px;
        height: 32px;
        font-size: 1.1rem;
    }
    
    .weekday {
        font-size: 0.65rem;
        padding: 0.4rem 0;
    }
    
    .calendar-days {
        gap: 3px;
    }
    
    .calendar-day {
        min-height: 40px;
        border-radius: 4px;
    }
    
    .calendar-day .day-number {
        font-size: 0.85rem;
    }
    
    .time-slots-grid {
        grid-template-columns: 1fr;
    }
    
    .time-slot-btn {
        padding: 1rem;
        font-size: 0.9rem;
    }
}