/* Termin-Buchung - Modernes CSS im Stripe/Apple-Stil */

/* Basis-Variablen */
:root {
    --tb-primary: #0071e3;
    --tb-primary-hover: #0077ed;
    --tb-success: #34c759;
    --tb-text: #1d1d1f;
    --tb-text-secondary: #86868b;
    --tb-border: #d2d2d7;
    --tb-bg: #ffffff;
    --tb-bg-secondary: #f5f5f7;
    --tb-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --tb-shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.12);
    --tb-radius: 12px;
    --tb-transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Container */
.tb-booking-wrapper {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.tb-booking-container {
    background: var(--tb-bg);
    border-radius: var(--tb-radius);
    box-shadow: var(--tb-shadow);
    overflow: hidden;
}

/* Header */
.tb-booking-header {
    text-align: center;
    padding: 48px 32px;
    border-bottom: 1px solid var(--tb-border);
}

.tb-booking-header h2 {
    font-size: 32px;
    font-weight: 600;
    color: var(--tb-text);
    margin: 0 0 12px 0;
    letter-spacing: -0.5px;
}

.tb-booking-header p {
    font-size: 17px;
    color: var(--tb-text-secondary);
    margin: 0;
}

/* Steps Indicator */
.tb-booking-steps {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 32px;
    border-bottom: 1px solid var(--tb-border);
}

.tb-step {
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0.4;
    transition: var(--tb-transition);
}

.tb-step-active {
    opacity: 1;
}

.tb-step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--tb-bg-secondary);
    color: var(--tb-text-secondary);
    font-weight: 600;
    font-size: 14px;
}

.tb-step-active .tb-step-number {
    background: var(--tb-primary);
    color: white;
}

.tb-step-label {
    font-size: 15px;
    font-weight: 500;
    color: var(--tb-text);
}

/* Content */
.tb-booking-content {
    padding: 40px 32px;
    min-height: 400px;
}

.tb-step-content {
    display: none;
}

.tb-step-content.tb-active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Kalender */
.tb-calendar-wrapper {
    max-width: 500px;
    margin: 0 auto;
}

.tb-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.tb-calendar-month {
    font-size: 20px;
    font-weight: 600;
    color: var(--tb-text);
    margin: 0;
}

.tb-calendar-nav {
    width: 40px;
    height: 40px;
    border: 1px solid var(--tb-border);
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    color: var(--tb-text);
    transition: var(--tb-transition);
}

.tb-calendar-nav:hover:not(:disabled) {
    background: var(--tb-bg-secondary);
    transform: scale(1.05);
}

.tb-calendar-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.tb-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.tb-calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--tb-transition);
    background: white;
    border: 1px solid var(--tb-border);
    color: var(--tb-text);
}

.tb-calendar-day.tb-day-header {
    font-size: 12px;
    font-weight: 600;
    color: var(--tb-text-secondary);
    cursor: default;
    border: none;
    background: transparent;
}

.tb-calendar-day.tb-day-disabled {
    color: var(--tb-text-secondary);
    opacity: 0.3;
    cursor: not-allowed;
    background: transparent;
}

.tb-calendar-day.tb-day-unavailable {
    color: var(--tb-text-secondary);
    opacity: 0.5;
    cursor: not-allowed;
    text-decoration: line-through;
}

.tb-calendar-day:not(.tb-day-disabled):not(.tb-day-unavailable):not(.tb-day-header):hover {
    background: var(--tb-bg-secondary);
    transform: scale(1.05);
    box-shadow: var(--tb-shadow);
}

.tb-calendar-day.tb-selected {
    background: var(--tb-primary);
    color: white;
    border-color: var(--tb-primary);
}

/* Time Slots */
.tb-time-slots-header {
    margin-bottom: 32px;
}

.tb-time-slots-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--tb-text);
    margin: 16px 0 0 0;
}

.tb-back-button {
    background: transparent;
    border: none;
    color: var(--tb-primary);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 0;
    transition: var(--tb-transition);
}

.tb-back-button:hover {
    opacity: 0.7;
}

.tb-loading {
    text-align: center;
    padding: 60px 20px;
}

.tb-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 20px;
    border: 3px solid var(--tb-bg-secondary);
    border-top-color: var(--tb-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.tb-loading p {
    color: var(--tb-text-secondary);
    font-size: 15px;
}

.tb-time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    max-width: 700px;
    margin: 0 auto;
}

.tb-time-slot {
    padding: 16px;
    border: 1px solid var(--tb-border);
    border-radius: 8px;
    text-align: center;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--tb-transition);
    background: white;
    color: var(--tb-text);
}

.tb-time-slot:hover:not(.tb-slot-unavailable) {
    background: var(--tb-bg-secondary);
    transform: translateY(-2px);
    box-shadow: var(--tb-shadow);
}

.tb-time-slot.tb-slot-unavailable {
    opacity: 0.4;
    cursor: not-allowed;
    text-decoration: line-through;
}

.tb-time-slot.tb-selected {
    background: var(--tb-primary);
    color: white;
    border-color: var(--tb-primary);
}

/* Formular */
.tb-form-header {
    margin-bottom: 32px;
}

.tb-booking-summary {
    background: var(--tb-bg-secondary);
    padding: 20px;
    border-radius: 8px;
    margin-top: 16px;
    font-size: 15px;
    line-height: 1.6;
}

.tb-form {
    max-width: 500px;
    margin: 0 auto;
}

.tb-form-group {
    margin-bottom: 24px;
}

.tb-form-group label {
    display: block;
    font-size: 15px;
    font-weight: 500;
    color: var(--tb-text);
    margin-bottom: 8px;
}

.tb-form-group input[type="text"],
.tb-form-group input[type="email"],
.tb-form-group input[type="tel"] {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--tb-border);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: var(--tb-transition);
    background: white;
}

.tb-form-group input:focus {
    outline: none;
    border-color: var(--tb-primary);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
}

.tb-checkbox-group label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.tb-checkbox-group input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.tb-checkbox-group a {
    color: var(--tb-primary);
    text-decoration: none;
}

.tb-checkbox-group a:hover {
    text-decoration: underline;
}

.tb-form-actions {
    margin-top: 32px;
}

.tb-submit-button {
    width: 100%;
    padding: 16px;
    background: var(--tb-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--tb-transition);
}

.tb-submit-button:hover {
    background: var(--tb-primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--tb-shadow-hover);
}

.tb-submit-button:active {
    transform: translateY(0);
}

.tb-submit-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tb-form-note {
    margin-top: 20px;
    font-size: 13px;
    color: var(--tb-text-secondary);
    text-align: center;
    line-height: 1.5;
}

/* Erfolgs-Meldung */
.tb-success-message {
    text-align: center;
    padding: 60px 32px;
}

.tb-success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: var(--tb-success);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: bold;
}

.tb-success-message h2 {
    font-size: 28px;
    font-weight: 600;
    color: var(--tb-text);
    margin: 0 0 16px 0;
}

.tb-success-message p {
    font-size: 17px;
    color: var(--tb-text-secondary);
    line-height: 1.6;
    margin: 0 0 12px 0;
}

.tb-success-message .tb-note {
    font-size: 15px;
    color: var(--tb-text-secondary);
    margin-top: 24px;
}

/* Responsive */
@media (max-width: 768px) {
    .tb-booking-wrapper {
        margin: 20px auto;
        padding: 0 16px;
    }
    
    .tb-booking-header {
        padding: 32px 24px;
    }
    
    .tb-booking-header h2 {
        font-size: 24px;
    }
    
    .tb-booking-steps {
        gap: 20px;
        padding: 24px 16px;
    }
    
    .tb-step-label {
        display: none;
    }
    
    .tb-booking-content {
        padding: 32px 20px;
    }
    
    .tb-time-slots {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
    }
}

/* Shortcode Info */
.tb-shortcode-info {
    background: var(--tb-bg-secondary);
    border: 1px solid var(--tb-border);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.tb-shortcode-info h3 {
    margin: 0 0 12px 0;
    font-size: 16px;
}

.tb-shortcode-info code {
    background: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    display: inline-block;
}
