/* Terminkalender Pro - Modern Treatwell Style */

:root {
    --primary-color: #7c3aed;
    --primary-dark: #6d28d9;
    --primary-light: #a78bfa;
    --secondary-color: #ec4899;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --background: #ffffff;
    --background-gray: #f9fafb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
}

* {
    box-sizing: border-box;
}

.tk-booking-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    color: var(--text-primary);
    line-height: 1.6;
}

/* Header */
.tk-header {
    text-align: center;
    margin-bottom: 48px;
    animation: fadeInDown 0.6s ease;
}

.tk-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.tk-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

/* Steps */
.tk-step {
    background: var(--background);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    padding: 32px;
    margin-bottom: 24px;
    animation: fadeIn 0.5s ease;
}

.tk-step-header {
    display: flex;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(90deg, #a557ab 0%, #feb692 100%);
    color: white;
    font-weight: 700;
    border-radius: 50%;
    margin-right: 16px;
    flex-shrink: 0;
}

.tk-step-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

/* Service Cards */
.tk-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.service-card {
    background: var(--background);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.service-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.service-card:hover::before {
    transform: translateX(0);
}

.service-card.selected {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.05), rgba(236, 72, 153, 0.05));
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1);
}

.service-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.service-description {
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.service-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.service-duration {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.service-duration::before {
    content: '⏱';
    margin-right: 6px;
}

.service-price {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Date & Time Container */
.tk-datetime-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

@media (max-width: 768px) {
    .tk-datetime-container {
        grid-template-columns: 1fr;
    }
}

/* Calendar Section */
.tk-calendar-section {
    min-width: 0;
}

.tk-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 16px;
    background: var(--background-gray);
    border-radius: 8px;
}

.tk-calendar-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.nav-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--background);
    color: var(--text-primary);
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.nav-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.nav-btn:disabled:hover {
    background: var(--background);
    color: var(--text-primary);
    transform: none;
}

/* Calendar Grid */
.tk-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-weekday {
    text-align: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding: 8px 0;
    text-transform: uppercase;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--background);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
}

.calendar-day:hover:not(.disabled):not(.blocked) {
    background: var(--primary-light);
    color: white;
    border-color: var(--primary-color);
    transform: scale(1.1);
    z-index: 1;
}

.calendar-day.today {
    background: var(--background-gray);
    font-weight: 700;
}

.calendar-day.today::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 50%;
}

.calendar-day.selected {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.2);
}

.calendar-day.disabled {
    background: var(--background-gray);
    color: var(--text-secondary);
    cursor: not-allowed;
    opacity: 0.5;
}

.calendar-day.blocked {
    background: repeating-linear-gradient(
        45deg,
        #fee2e2,
        #fee2e2 10px,
        #fecaca 10px,
        #fecaca 20px
    );
    color: var(--danger-color);
    cursor: not-allowed;
}

/* Time Slots */
.tk-timeslots-section {
    background: var(--background-gray);
    border-radius: var(--border-radius);
    padding: 24px;
}

.tk-timeslots-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.tk-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
}

.time-slot {
    padding: 12px;
    text-align: center;
    background: var(--background);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.time-slot:hover:not(.booked) {
    background: var(--primary-light);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.time-slot.selected {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.2);
}

.time-slot.booked {
    background: var(--background-gray);
    color: var(--text-secondary);
    cursor: not-allowed;
    opacity: 0.5;
    text-decoration: line-through;
}

/* Booking Summary */
.tk-booking-summary {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.05), rgba(236, 72, 153, 0.05));
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 32px;
}

.tk-booking-summary h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.summary-row.total {
    margin-top: 12px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
    font-size: 1.125rem;
}

.summary-row span {
    color: var(--text-secondary);
}

.summary-row strong {
    color: var(--text-primary);
    font-weight: 600;
}

.summary-row.total strong {
    color: var(--primary-color);
    font-size: 1.25rem;
}

/* Form Styles */
.tk-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 640px) {
    .tk-form-row {
        grid-template-columns: 1fr;
    }
}

.tk-form-group {
    margin-bottom: 20px;
}

.tk-form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95rem;
}

.tk-form-group input,
.tk-form-group textarea,
.tk-form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    font-family: inherit;
}

.tk-form-group input:focus,
.tk-form-group textarea:focus,
.tk-form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1);
}

.tk-form-group input.error,
.tk-form-group textarea.error {
    border-color: var(--danger-color);
}

.error-message {
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: 4px;
}

/* Buttons */
.tk-btn-primary,
.tk-btn-secondary {
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tk-btn-primary {
    background: linear-gradient(90deg, #a557ab 0%, #feb692 100%);
    color: white;
    box-shadow: var(--shadow-md);
}

.tk-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.tk-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.tk-btn-secondary {
    background: var(--background);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.tk-btn-secondary:hover {
    background: var(--background-gray);
    border-color: var(--primary-color);
}

.tk-form-actions {
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-top: 32px;
}

/* Success Message */
.tk-success-message {
    text-align: center;
    padding: 48px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(34, 197, 94, 0.05));
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, var(--success-color), #059669);
    color: white;
    font-size: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    animation: scaleIn 0.5s ease;
}

.tk-success-message h2 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.tk-success-message p {
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin-bottom: 32px;
}

/* Loading Spinner */
.tk-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .tk-booking-container {
        padding: 0px;
    }
    
    .tk-step {
        padding: 20px;
    }
    
    .tk-header h1 {
        font-size: 2rem;
    }
    
    .tk-services-grid {
        grid-template-columns: 1fr;
    }
    
    .tk-calendar-grid {
        gap: 4px;
    }
    
    .calendar-day {
        font-size: 0.875rem;
    }
    
    .tk-slots-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
}