/* Finias Calendar Commerce - Frontend Styles */

/* Container */
.finias-calendar-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
}

/* Event Types Selection */
.finias-cal-event-types {
    margin-bottom: 40px;
    padding: 30px 0;
}

.event-types-header {
    text-align: center;
    margin-bottom: 40px;
}

.event-types-header h2 {
    margin: 0 0 10px 0;
    color: #23282d;
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.event-types-subtitle {
    margin: 0;
    color: #666;
    font-size: 16px;
    font-weight: 400;
}

.event-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.event-type-card {
    background: #fff;
    border: 2px solid #e5e5e5;
    border-radius: 16px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.event-type-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #007cba 0%, #005a87 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.event-type-card:hover {
    border-color: #007cba;
    box-shadow: 0 8px 25px rgba(0,124,186,0.15);
    transform: translateY(-2px);
}

.event-type-card:hover::before {
    transform: scaleX(1);
}

.event-type-card.selected {
    border-color: #007cba;
    background: linear-gradient(135deg, #f0f8ff 0%, #e3f2fd 100%);
    box-shadow: 0 8px 25px rgba(0,124,186,0.2);
}

.event-type-card.selected::before {
    transform: scaleX(1);
}

.event-type-icon {
    text-align: center;
    margin-bottom: 16px;
}

.service-icon {
    width: 32px;
    height: 32px;
    display: inline-block;
    padding: 12px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 50%;
    border: 2px solid #e5e5e5;
    transition: all 0.3s ease;
    color: #495057;
}

.event-type-card:hover .service-icon {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-color: #007cba;
    transform: scale(1.1);
}

.event-type-content {
    flex: 1;
    text-align: center;
}

.event-type-title {
    margin: 0 0 12px 0;
    color: #23282d;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
}

.event-type-meta {
    margin-bottom: 16px;
}

.duration-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f8f9fa;
    color: #495057;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #e9ecef;
}

.event-type-card.selected .duration-badge {
    background: #007cba;
    color: #fff;
    border-color: #005a87;
}

.event-type-description {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 16px;
    text-align: left;
}

.event-type-description p {
    margin: 0;
}

.event-type-price {
    font-weight: 700;
    color: #007cba;
    font-size: 18px;
    margin-bottom: 16px;
}

.event-type-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    color: #495057;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-top: auto;
}

.event-type-card:hover .event-type-action {
    background: #007cba;
    color: #fff;
    border-color: #005a87;
}

.event-type-card.selected .event-type-action {
    background: #007cba;
    color: #fff;
    border-color: #005a87;
}

.select-text {
    font-size: 14px;
}

.select-arrow {
    transition: transform 0.3s ease;
}

.event-type-card:hover .select-arrow {
    transform: translateX(4px);
}

/* Navigation */
.finias-cal-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    color: #23282d;
}

.nav-btn:hover:not(:disabled) {
    background: #f8f9fa;
    border-color: #007cba;
}

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

.current-week-info {
    font-weight: 600;
    color: #23282d;
}

/* Calendar Wrapper */
.finias-cal-calendar-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
    margin-bottom: 20px;
}

/* Calendar Grid */
.finias-cal-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #ddd;
}

/* Calendar Header */
.calendar-header {
    background: #23282d;
    color: #fff;
    padding: 15px;
    text-align: center;
    font-weight: 600;
}

/* Calendar Days */
.calendar-day {
    background: #fff;
    min-height: 80px;
    padding: 8px;
    position: relative;
    border: 1px solid #e5e5e5;
    cursor: pointer;
    transition: all 0.2s;
}

.calendar-day:hover {
    background: #f8f9fa;
}

.calendar-day.empty {
    background: #f8f9fa;
    color: #999;
    cursor: default;
}

.calendar-day.empty:hover {
    background: #f8f9fa;
}

.calendar-day-header {
    font-weight: 600;
    color: #23282d;
    text-align: center;
    font-size: 14px;
    margin-bottom: 4px;
}

.calendar-day.today {
    background: #e3f2fd;
    border-color: #007cba;
}

.calendar-day.today .calendar-day-header {
    color: #007cba;
    font-weight: bold;
}

.calendar-day.selected {
    background: #007cba;
    color: #fff;
    border-color: #005a87;
}

.calendar-day.selected .calendar-day-header {
    color: #fff;
}

.calendar-day.past {
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

.calendar-day.past:hover {
    background: #f5f5f5;
}

.calendar-day.has-appointments::after {
    content: '';
    position: absolute;
    top: 5px;
    right: 5px;
    width: 6px;
    height: 6px;
    background: #dc3545;
    border-radius: 50%;
}

/* Time Slots */
.finias-cal-time-slots {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 20px;
    height: fit-content;
}

.finias-cal-time-slots h3 {
    margin: 0 0 15px 0;
    color: #23282d;
    font-size: 16px;
}

.selected-date-info {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-weight: 600;
    color: #007cba;
    text-align: center;
}

.time-slots-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.no-date-selected {
    text-align: center;
    color: #666;
    font-style: italic;
    margin: 20px 0;
}

.time-slot {
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    color: #23282d;
    font-weight: 500;
}

.time-slot:hover {
    background: #f0f8ff;
    border-color: #007cba;
    transform: translateY(-1px);
}

.time-slot.selected {
    background: #007cba;
    color: #fff;
    border-color: #007cba;
}

.time-slot.booked {
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
    border-color: #ddd;
}

.time-slot.booked:hover {
    background: #f5f5f5;
    transform: none;
}

/* Booking Form */
.finias-cal-booking-form {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.finias-cal-booking-form h3 {
    margin: 0 0 20px 0;
    color: #23282d;
}

.booking-summary {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.booking-detail {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 5px 0;
}

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

.booking-detail strong {
    color: #23282d;
}

.form-row {
    margin-bottom: 15px;
}

.form-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #23282d;
}

.form-row input,
.form-row textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-row textarea {
    resize: vertical;
    min-height: 80px;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Loading & Error States */
.finias-cal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.finias-cal-error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
    border: 1px solid #f5c6cb;
}

.finias-cal-error p {
    margin: 0;
}

/* List Layout */
.finias-cal-list .finias-cal-calendar-grid {
    display: block;
}

.finias-cal-list .calendar-week {
    display: grid;
    grid-template-columns: 150px repeat(7, 1fr);
    margin-bottom: 10px;
}

.finias-cal-list .week-header {
    font-weight: 600;
    padding: 10px;
    background: #23282d;
    color: #fff;
}

.finias-cal-list .calendar-day {
    border: 1px solid #e5e5e5;
}

/* Dark Theme */
.finias-cal-theme-dark {
    background: #1a1a1a;
    color: #fff;
}

.finias-cal-theme-dark .finias-calendar-container {
    background: #1a1a1a;
    color: #fff;
}

.finias-cal-theme-dark .event-type-option,
.finias-cal-theme-dark .calendar-day,
.finias-cal-theme-dark .time-slot,
.finias-cal-theme-dark .finias-cal-booking-form {
    background: #2d2d2d;
    color: #fff;
    border-color: #404040;
}

.finias-cal-theme-dark .finias-cal-navigation,
.finias-cal-theme-dark .finias-cal-time-slots,
.finias-cal-theme-dark .booking-summary {
    background: #2d2d2d;
    color: #fff;
}

.finias-cal-theme-dark .nav-btn {
    background: #404040;
    border-color: #555;
    color: #fff;
}

.finias-cal-theme-dark .calendar-header {
    background: #404040;
}

/* Mehrfachdatei-Upload */
.file-upload-section {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
}

.file-upload-container {
    position: relative;
}

.file-upload-container input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.file-upload-area {
    border: 2px dashed #007cba;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    background: #fff;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.file-upload-area:hover {
    border-color: #005a87;
    background: #f0f8ff;
}

.file-upload-area.dragover {
    border-color: #005a87;
    background: #e3f2fd;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 15px;
    color: #007cba;
}

.upload-text {
    font-size: 16px;
    font-weight: 600;
    color: #23282d;
    margin: 0 0 10px 0;
}

.upload-description {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.file-list {
    margin-top: 20px;
    padding: 15px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
}

.file-list h4 {
    margin: 0 0 15px 0;
    color: #23282d;
    font-size: 16px;
}

.selected-files {
    list-style: none;
    padding: 0;
    margin: 0;
}

.selected-files li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    margin-bottom: 8px;
    background: #f8f9fa;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-icon {
    font-size: 20px;
}

.file-details {
    flex: 1;
}

.file-name {
    font-weight: 600;
    color: #23282d;
    margin: 0;
}

.file-size {
    font-size: 12px;
    color: #666;
    margin: 0;
}

.remove-file {
    background: #dc3545;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.3s ease;
}

.remove-file:hover {
    background: #c82333;
}

.vaccination-card-status {
    margin-top: 10px;
    padding: 10px;
    border-radius: 4px;
}

.vaccination-card-status.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.vaccination-card-status.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* File Upload Hint Styles */
.file-upload-hint {
    margin-top: 15px;
    padding: 12px 15px;
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 6px;
    display: flex;
    align-items: flex-start;
}

.hint-icon {
    font-size: 16px;
    margin-right: 10px;
    margin-top: 2px;
}

.hint-content {
    flex: 1;
}

.hint-content p {
    margin: 0;
    color: #004085;
    font-size: 14px;
    line-height: 1.4;
}

.hint-content strong {
    font-weight: 600;
}

/* Bezahlungshinweis */
.payment-notice {
    display: flex;
    align-items: flex-start;
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #e3f2fd 0%, #f0f8ff 100%);
    border: 1px solid #007cba;
    border-radius: 8px;
}

.notice-icon {
    font-size: 24px;
    margin-right: 15px;
    margin-top: 2px;
}

.notice-content h4 {
    margin: 0 0 8px 0;
    color: #007cba;
    font-size: 16px;
}

.notice-content p {
    margin: 0;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 768px) {
    .finias-calendar-container {
        padding: 10px;
    }

    .event-types-header h2 {
        font-size: 24px;
    }

    .event-types-subtitle {
        font-size: 14px;
    }

    .event-types-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .event-type-card {
        padding: 20px;
    }

    .event-type-title {
        font-size: 18px;
    }

    .service-icon {
        font-size: 28px;
        padding: 10px;
    }

    .finias-cal-navigation {
        flex-direction: column;
        gap: 10px;
    }

    .finias-cal-calendar-wrapper {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .finias-cal-calendar-grid {
        grid-template-columns: repeat(7, 1fr);
        font-size: 12px;
    }

    .calendar-day {
        min-height: 60px;
        padding: 4px;
    }

    .calendar-day-header {
        font-size: 12px;
    }

    .time-slots-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .finias-cal-calendar-grid {
        grid-template-columns: repeat(7, 1fr);
    }

    .calendar-day {
        min-height: 60px;
    }

    .time-slots-list {
        grid-template-columns: repeat(2, 1fr);
    }
}
