/**
 * Raumbuchungstool Public Styles
 *
 * @package Raumbuchungstool
 */

/* ==========================================================================
   CSS Variables
   ========================================================================== */

:root {
    --rbt-primary: #2271b1;
    --rbt-primary-hover: #135e96;
    --rbt-success: #28a745;
    --rbt-warning: #f0ad4e;
    --rbt-danger: #d9534f;
    --rbt-gray: #6c757d;
    --rbt-light: #f8f9fa;
    --rbt-border: #dee2e6;
    --rbt-text: #212529;
    --rbt-text-muted: #6c757d;
    --rbt-radius: 8px;
    --rbt-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   Calendar Wrapper
   ========================================================================== */

.rbt-calendar-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

.rbt-calendar-header {
    margin-bottom: 20px;
}

.rbt-calendar-title {
    margin: 0 0 5px 0;
    font-size: 24px;
    font-weight: 600;
    color: var(--rbt-text);
}

.rbt-calendar-location {
    margin: 0;
    color: var(--rbt-text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ==========================================================================
   Calendar Legend
   ========================================================================== */

.rbt-calendar-legend,
.rbt-availability-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background: var(--rbt-light);
    border-radius: var(--rbt-radius);
}

.rbt-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--rbt-text);
}

.rbt-legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

.rbt-legend-available .rbt-legend-color,
.rbt-legend-available::before {
    background-color: var(--rbt-success);
}

.rbt-legend-pending .rbt-legend-color,
.rbt-legend-pending::before {
    background-color: var(--rbt-warning);
}

.rbt-legend-booked .rbt-legend-color,
.rbt-legend-booked::before {
    background-color: var(--rbt-danger);
}

/* ==========================================================================
   FullCalendar Customization
   ========================================================================== */

.rbt-calendar {
    background: #fff;
    border-radius: var(--rbt-radius);
    box-shadow: var(--rbt-shadow);
    padding: 20px;
}

.rbt-calendar .fc {
    font-family: inherit;
}

.rbt-calendar .fc-toolbar-title {
    font-size: 20px !important;
    font-weight: 600;
}

.rbt-calendar .fc-button {
    background: var(--rbt-primary) !important;
    border-color: var(--rbt-primary) !important;
    font-weight: 500;
}

.rbt-calendar .fc-button:hover {
    background: var(--rbt-primary-hover) !important;
    border-color: var(--rbt-primary-hover) !important;
}

.rbt-calendar .fc-button-active {
    background: var(--rbt-primary-hover) !important;
}

.rbt-calendar .fc-daygrid-day:hover {
    background: var(--rbt-light);
    cursor: pointer;
}

.rbt-calendar .fc-event {
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 12px;
    cursor: pointer;
}

.rbt-calendar .fc-daygrid-day-number {
    padding: 8px;
    font-weight: 500;
}

/* ==========================================================================
   Modal
   ========================================================================== */

.rbt-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rbt-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.rbt-modal-content {
    position: relative;
    background: #fff;
    border-radius: var(--rbt-radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.rbt-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--rbt-text-muted);
    line-height: 1;
    padding: 5px;
}

.rbt-modal-close:hover {
    color: var(--rbt-text);
}

.rbt-modal-body {
    padding: 30px;
}

.rbt-modal-body h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
}

.rbt-modal-body dl {
    margin: 0;
}

.rbt-modal-body dt {
    font-weight: 600;
    color: var(--rbt-text-muted);
    font-size: 12px;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.rbt-modal-body dd {
    margin: 0 0 15px 0;
    font-size: 16px;
}

/* ==========================================================================
   Booking Form
   ========================================================================== */

.rbt-booking-wrapper {
    max-width: 800px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

.rbt-booking-header {
    margin-bottom: 30px;
}

.rbt-booking-title {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: var(--rbt-text);
}

.rbt-booking-form {
    background: #fff;
    border-radius: var(--rbt-radius);
    box-shadow: var(--rbt-shadow);
    padding: 30px;
}

.rbt-form-section {
    margin-bottom: 30px;
}

.rbt-form-section:last-child {
    margin-bottom: 0;
}

.rbt-form-section h3 {
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--rbt-primary);
    font-size: 18px;
    font-weight: 600;
    color: var(--rbt-text);
}

.rbt-form-row {
    margin-bottom: 20px;
}

.rbt-form-row:last-child {
    margin-bottom: 0;
}

.rbt-form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.rbt-form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

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

@media (max-width: 600px) {
    .rbt-form-row-2,
    .rbt-form-row-3 {
        grid-template-columns: 1fr;
    }
}

/* Adressfelder spezielle Breiten */
.rbt-form-row-3 .rbt-form-field-street {
    grid-column: span 2;
}

.rbt-form-row-3 .rbt-form-field-plz {
    max-width: 120px;
}

@media (max-width: 768px) {
    .rbt-form-row-3 .rbt-form-field-street {
        grid-column: span 1;
    }
}

.rbt-form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--rbt-text);
}

.rbt-form-field .required {
    color: var(--rbt-danger);
}

.rbt-form-field input[type="text"],
.rbt-form-field input[type="email"],
.rbt-form-field input[type="tel"],
.rbt-form-field input[type="date"],
.rbt-form-field input[type="time"],
.rbt-form-field select,
.rbt-form-field textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--rbt-border);
    border-radius: 6px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.rbt-form-field input:focus,
.rbt-form-field select:focus,
.rbt-form-field textarea:focus {
    outline: none;
    border-color: var(--rbt-primary);
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.15);
}

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

/* Checkbox Container - wie andere Formularfelder */
.rbt-checkbox-field {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: #fff;
    border: 1px solid var(--rbt-border);
    border-radius: 6px;
    transition: border-color 0.2s, box-shadow 0.2s;
    min-height: 48px;
}

.rbt-checkbox-field:hover {
    border-color: var(--rbt-primary);
}

.rbt-checkbox-field:focus-within {
    border-color: var(--rbt-primary);
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}

/* Custom Checkbox */
.rbt-checkbox-label {
    display: flex!important;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-weight: normal;
    line-height: 1.4;
    margin: 0!important;
    width: 100%;
    user-select: none;
}

.rbt-checkbox-label input[type="checkbox"] {
    /* Verstecke native Checkbox */
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Custom Checkbox Box */
.rbt-checkbox-custom {
    width: 22px;
    height: 22px;
    min-width: 22px;
    border: 2px solid var(--rbt-border);
    border-radius: 4px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.rbt-checkbox-label:hover .rbt-checkbox-custom {
    border-color: var(--rbt-primary);
}

/* Checkmark Icon */
.rbt-checkbox-custom::after {
    content: '';
    width: 6px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.15s ease;
    margin-bottom: 2px;
}

/* Checked State */
.rbt-checkbox-label input[type="checkbox"]:checked + .rbt-checkbox-custom {
    background: var(--rbt-primary);
    border-color: var(--rbt-primary);
}

.rbt-checkbox-label input[type="checkbox"]:checked + .rbt-checkbox-custom::after {
    transform: rotate(45deg) scale(1);
}

/* Focus State */
.rbt-checkbox-label input[type="checkbox"]:focus + .rbt-checkbox-custom {
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.2);
}

/* Checkbox Text */
.rbt-checkbox-text {
    flex: 1;
    color: var(--rbt-text);
    font-size: 14px;
}

.rbt-checkbox-text a {
    color: var(--rbt-primary);
    text-decoration: underline;
    font-weight: 500;
}

.rbt-checkbox-text a:hover {
    text-decoration: none;
}

/* Required Checkbox spezielles Styling */
.rbt-checkbox-required {
    background: linear-gradient(135deg, #f8fbff 0%, #fff 100%);
    border: 1px solid var(--rbt-primary);
    border-left: 4px solid var(--rbt-primary);
}

.rbt-checkbox-required .rbt-checkbox-text {
    font-weight: 500;
}

/* ==========================================================================
   Form Notice
   ========================================================================== */

.rbt-form-notice {
    background: #e7f3ff;
    border: 1px solid #b8daff;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
}

.rbt-form-notice p {
    margin: 0;
    font-size: 14px;
    color: #004085;
}

/* ==========================================================================
   Submit Button
   ========================================================================== */

.rbt-form-actions {
    text-align: center;
}

.rbt-submit-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 40px;
    background: var(--rbt-primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.rbt-submit-button:hover {
    background: var(--rbt-primary-hover);
}

.rbt-submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.rbt-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: rbt-spin 0.8s linear infinite;
}

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

/* ==========================================================================
   Form Messages
   ========================================================================== */

.rbt-form-messages {
    margin-top: 20px;
    padding: 15px;
    border-radius: 6px;
}

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

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

/* ==========================================================================
   Available Times
   ========================================================================== */

.rbt-available-times {
    margin-top: 30px;
    padding: 20px;
    background: var(--rbt-light);
    border-radius: var(--rbt-radius);
}

.rbt-available-times h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
}

.rbt-available-times ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.rbt-available-times li {
    padding: 8px 0;
    border-bottom: 1px solid var(--rbt-border);
}

.rbt-available-times li:last-child {
    border-bottom: none;
}

/* ==========================================================================
   Availability Grid
   ========================================================================== */

.rbt-availability {
    max-width: 1200px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

.rbt-availability h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 600;
}

.rbt-availability-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.rbt-availability-day {
    background: #fff;
    border-radius: var(--rbt-radius);
    box-shadow: var(--rbt-shadow);
    overflow: hidden;
}

.rbt-availability-date {
    background: var(--rbt-primary);
    color: #fff;
    padding: 12px;
    font-weight: 600;
    text-align: center;
}

.rbt-availability-slots {
    padding: 10px;
}

.rbt-availability-slot {
    padding: 8px 12px;
    margin-bottom: 5px;
    border-radius: 4px;
    font-size: 13px;
    text-align: center;
}

.rbt-availability-slot:last-child {
    margin-bottom: 0;
}

.rbt-slot-available {
    background: #d4edda;
    color: #155724;
}

.rbt-slot-pending {
    background: #fff3cd;
    color: #856404;
}

.rbt-slot-booked {
    background: #f8d7da;
    color: #721c24;
}

.rbt-availability-closed {
    padding: 20px;
    text-align: center;
    color: var(--rbt-text-muted);
    font-style: italic;
}

/* ==========================================================================
   Datepicker Section (Booking Form)
   ========================================================================== */

.rbt-booking-datepicker-section {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 20px;
    margin-bottom: 30px;
    align-items: stretch;
}

@media (max-width: 800px) {
    .rbt-booking-datepicker-section {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Custom Datepicker with Availability
   ========================================================================== */

.rbt-datepicker-container {
    background: #fff;
    border-radius: var(--rbt-radius);
    box-shadow: var(--rbt-shadow);
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.rbt-datepicker-header {
    margin-bottom: 15px;
}

.rbt-datepicker-header h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--rbt-text);
}

.rbt-datepicker-legend {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.rbt-dp-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: var(--rbt-text-muted);
}

.rbt-dp-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.rbt-dp-dot.rbt-dp-free {
    background: var(--rbt-success);
}

.rbt-dp-dot.rbt-dp-partial {
    background: var(--rbt-warning);
}

.rbt-dp-dot.rbt-dp-full {
    background: var(--rbt-danger);
}

/* Datepicker Grid */
.rbt-datepicker {
    min-height: 280px;
}

.rbt-dp-loading,
.rbt-dp-error {
    text-align: center;
    padding: 40px;
    color: var(--rbt-text-muted);
}

.rbt-dp-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.rbt-dp-prev,
.rbt-dp-next {
    background: none;
    border: 1px solid var(--rbt-border);
    border-radius: 4px;
    padding: 5px 12px;
    cursor: pointer;
    font-size: 14px;
    color: var(--rbt-text);
    transition: all 0.2s;
}

.rbt-dp-prev:hover,
.rbt-dp-next:hover {
    background: var(--rbt-light);
    border-color: var(--rbt-primary);
    color: var(--rbt-primary);
}

.rbt-dp-title {
    font-weight: 600;
    font-size: 15px;
    color: var(--rbt-text);
}

.rbt-dp-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 5px;
}

.rbt-dp-weekday {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--rbt-text-muted);
    padding: 5px 0;
}

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

.rbt-dp-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 13px;
    position: relative;
    background: #fff;
    border: 1px solid transparent;
}

.rbt-dp-day-num {
    font-weight: 500;
    line-height: 1;
}

.rbt-dp-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-top: 3px;
}

/* Day States */
.rbt-dp-empty {
    background: transparent;
}

.rbt-dp-past {
    color: #ccc;
}

.rbt-dp-unavailable {
    color: #ccc;
    background: #f9f9f9;
}

.rbt-dp-free .rbt-dp-indicator {
    background: var(--rbt-success);
}

.rbt-dp-partial .rbt-dp-indicator {
    background: var(--rbt-warning);
}

.rbt-dp-full .rbt-dp-indicator {
    background: var(--rbt-danger);
}

.rbt-dp-full {
    color: #999;
}

.rbt-dp-clickable {
    cursor: pointer;
    transition: all 0.15s;
}

.rbt-dp-clickable:hover {
    background: var(--rbt-light);
    border-color: var(--rbt-border);
}

.rbt-dp-selected {
    background: var(--rbt-primary) !important;
    color: #fff !important;
    border-color: var(--rbt-primary) !important;
}

.rbt-dp-selected .rbt-dp-indicator {
    background: rgba(255, 255, 255, 0.8) !important;
}

/* FullCalendar Business Hours Styling (for standalone calendar) */
.rbt-calendar .fc-non-business {
    background: #f5f5f5 !important;
}

.rbt-calendar .fc-timegrid-slot {
    height: 2em;
}

/* ==========================================================================
   Day Detail Panel (Timeline)
   ========================================================================== */

.rbt-day-detail {
    background: #fff;
    border-radius: var(--rbt-radius);
    box-shadow: var(--rbt-shadow);
    padding: 20px;
    margin-top: 0;
    display: flex;
    flex-direction: column;
}

@media (max-width: 800px) {
    .rbt-day-detail {
        margin-top: 20px;
    }
}

.rbt-day-detail-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--rbt-primary);
}

.rbt-day-detail-header h3 {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--rbt-text);
}

.rbt-day-detail-title {
    font-size: 14px;
    color: var(--rbt-text-muted);
}

.rbt-day-detail-closed {
    text-align: center;
    padding: 20px;
    color: var(--rbt-text-muted);
}

/* Timeline Container */
.rbt-timeline-container {
    position: relative;
    margin-bottom: 15px;
}

.rbt-timeline-hours {
    position: relative;
    height: 25px;
    margin-bottom: 5px;
}

.rbt-timeline-hour {
    position: absolute;
    font-size: 10px;
    color: var(--rbt-text-muted);
    transform: translateX(-50%);
    white-space: nowrap;
}

/* Stunden-Zeile bei divisible Räumen */
.rbt-timeline-hours-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.rbt-timeline-hours-label {
    width: 90px;
    flex-shrink: 0;
}

.rbt-timeline-hours-row .rbt-timeline-hours {
    flex: 1;
    position: relative;
    height: 20px;
}

.rbt-timeline-track {
    position: relative;
    height: 60px;
    background: #f0f0f0;
    border-radius: 6px;
    overflow: hidden;
}

.rbt-timeline-track-small {
    height: 36px;
}

/* Divisible Room Layout */
.rbt-timeline-divisible {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rbt-timeline-division-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rbt-timeline-division-label {
    width: 90px;
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 500;
    color: var(--rbt-text);
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rbt-timeline-division-row .rbt-timeline-track {
    flex: 1;
    margin-left: 0;
}

.rbt-timeline-full-room {
    margin-top: 5px;
    padding-top: 10px;
    border-top: 1px dashed var(--rbt-border);
}

.rbt-timeline-full-room .rbt-timeline-division-label {
    font-style: italic;
    color: var(--rbt-text-muted);
}

/* Smaller booking labels in small tracks */
.rbt-timeline-track-small .rbt-timeline-booking {
    top: 4px;
    bottom: 4px;
}

.rbt-timeline-track-small .rbt-timeline-booking-label {
    font-size: 9px;
}

/* Schmale Buchungen: Kein Label, aber Cursor zeigt Tooltip an */
.rbt-timeline-booking.rbt-booking-narrow {
    cursor: help;
}

.rbt-timeline-slots,
.rbt-timeline-bookings,
.rbt-timeline-selection {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

/* Available Slots (green background) */
.rbt-timeline-slot {
    position: absolute;
    top: 0;
    bottom: 0;
    border-radius: 4px;
}

.rbt-slot-available {
    background: rgba(40, 167, 69, 0.25);
    border: 1px solid rgba(40, 167, 69, 0.4);
}

/* Booked Slots */
.rbt-timeline-booking {
    position: absolute;
    top: 8px;
    bottom: 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 10;
}

.rbt-booking-confirmed {
    background: rgba(217, 83, 79, 0.9);
    border: 1px solid #c9302c;
}

.rbt-booking-pending {
    background: rgba(240, 173, 78, 0.9);
    border: 1px solid #ec971f;
}

.rbt-timeline-booking-label {
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    padding: 0 5px;
    text-shadow: 0 1px 1px rgba(0,0,0,0.2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* Label nur anzeigen wenn Container breit genug */
    display: none;
}

/* Label nur anzeigen wenn Buchung mindestens 60px breit ist */
.rbt-timeline-booking:not(.rbt-booking-narrow) .rbt-timeline-booking-label {
    display: block;
}

/* User Selection */
.rbt-timeline-user-selection {
    position: absolute;
    top: 4px;
    bottom: 4px;
    background: rgba(34, 113, 177, 0.8);
    border: 2px solid var(--rbt-primary);
    border-radius: 4px;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    animation: rbt-pulse 2s infinite;
}

@keyframes rbt-pulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

.rbt-timeline-selection-label {
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    padding: 0 8px;
    text-shadow: 0 1px 1px rgba(0,0,0,0.3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Schmale Selection: Label verstecken */
.rbt-timeline-user-selection.rbt-selection-narrow .rbt-timeline-selection-label {
    display: none;
}

.rbt-timeline-user-selection.rbt-selection-narrow {
    cursor: help;
}

/* Timeline Legend */
.rbt-timeline-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 10px 0;
    border-top: 1px solid var(--rbt-border);
    margin-top: 10px;
}

.rbt-timeline-legend .rbt-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--rbt-text-muted);
}

.rbt-timeline-legend .rbt-legend-color {
    width: 14px;
    height: 14px;
    border-radius: 3px;
}

.rbt-color-available {
    background: rgba(40, 167, 69, 0.4);
    border: 1px solid rgba(40, 167, 69, 0.6);
}

.rbt-color-pending {
    background: rgba(240, 173, 78, 0.9);
}

.rbt-color-booked {
    background: rgba(217, 83, 79, 0.9);
}

.rbt-color-selection {
    background: rgba(34, 113, 177, 0.8);
    border: 1px solid var(--rbt-primary);
}

/* Conflict Warning */
.rbt-conflict-warning {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 15px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    margin-top: 15px;
}

.rbt-conflict-warning .rbt-icon-warning {
    color: #856404;
    flex-shrink: 0;
    margin-top: 2px;
}

.rbt-conflict-message {
    font-size: 13px;
    color: #856404;
    line-height: 1.5;
}

.rbt-conflict-error {
    background: #f8d7da;
    border-color: #f5c6cb;
}

.rbt-conflict-error .rbt-icon-warning,
.rbt-conflict-error .rbt-conflict-message {
    color: #721c24;
}

/* ==========================================================================
   Error Message
   ========================================================================== */

.rbt-error {
    padding: 15px 20px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: var(--rbt-radius);
    color: #721c24;
}

/* ==========================================================================
   Room Overview - Raumübersicht mit Kartenansicht
   ========================================================================== */

.rbt-room-overview {
    max-width: 1400px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

/* Room Grid */
.rbt-room-grid {
    display: grid;
    gap: 24px;
}

.rbt-grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.rbt-grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.rbt-grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
    .rbt-grid-cols-3,
    .rbt-grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .rbt-room-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Room Card */
.rbt-room-card {
    background: #fff;
    border: 1px solid var(--rbt-border);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.rbt-room-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--rbt-primary), #4a9eda);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.rbt-room-card:hover {
    border-color: var(--rbt-primary);
    box-shadow: 0 8px 24px rgba(34, 113, 177, 0.15);
    transform: translateY(-4px);
}

.rbt-room-card:hover::before {
    opacity: 1;
}

/* Card Header */
.rbt-room-card-header {
    margin-bottom: 12px;
}

.rbt-room-card-title {
    margin: 0 0 6px 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--rbt-text);
    line-height: 1.3;
}

.rbt-room-card-location {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: var(--rbt-text-muted);
}

.rbt-room-card-location svg {
    opacity: 0.7;
}

/* Card Description */
.rbt-room-card-description {
    margin: 0 0 16px 0;
    font-size: 14px;
    color: var(--rbt-text-muted);
    line-height: 1.6;
    flex-grow: 1;
}

/* Card Details */
.rbt-room-card-details {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--rbt-border);
}

.rbt-room-card-detail {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--rbt-text);
    background: var(--rbt-light);
    padding: 6px 10px;
    border-radius: 6px;
}

.rbt-room-card-detail svg {
    color: var(--rbt-primary);
    flex-shrink: 0;
}

/* Card Footer */
.rbt-room-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 16px;
}

.rbt-room-card-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--rbt-primary);
}

/* Select Button */
.rbt-room-select-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--rbt-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: auto;
}

.rbt-room-select-btn:hover {
    background: var(--rbt-primary-hover);
    transform: translateX(4px);
}

.rbt-room-select-btn svg {
    flex-shrink: 0;
    width: 18px;
    margin-bottom: 4px;
    height: 18px;
    vertical-align: middle;
    transition: transform 0.2s ease;
}

.rbt-room-select-btn:hover svg {
    transform: translateX(2px);
}

/* Booking Container */
.rbt-booking-container {
    animation: rbt-fade-in 0.3s ease;
}

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

.rbt-booking-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--rbt-border);
}

.rbt-back-to-rooms {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--rbt-light);
    color: var(--rbt-text);
    border: 1px solid var(--rbt-border);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rbt-back-to-rooms:hover {
    background: #fff;
    border-color: var(--rbt-primary);
    color: var(--rbt-primary);
}

.rbt-back-to-rooms svg {
    transition: transform 0.2s ease;
    flex-shrink: 0;
    width: 18px;
    margin-bottom:4px;
    height: 18px;
    vertical-align: middle;
}

.rbt-back-to-rooms:hover svg {
    transform: translateX(-3px);
}

.rbt-selected-room-title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: var(--rbt-text);
}

/* Loading Spinner */
.rbt-loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 16px;
}

.rbt-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--rbt-border);
    border-top-color: var(--rbt-primary);
    border-radius: 50%;
    animation: rbt-spin 0.8s linear infinite;
}

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

.rbt-loading-spinner span {
    font-size: 14px;
    color: var(--rbt-text-muted);
}

/* Notice */
.rbt-notice {
    padding: 20px 24px;
    background: var(--rbt-light);
    border: 1px solid var(--rbt-border);
    border-radius: var(--rbt-radius);
    color: var(--rbt-text-muted);
    text-align: center;
}

