/* ═══════════════════════════════════════════════════════════════
   FERIENWOHNUNGSMANAGER - Custom Styles
   ═══════════════════════════════════════════════════════════════ */

:root {
    --primary: #2563eb;
    --primary-light: #3b82f6;
    --primary-dark: #1d4ed8;
    --secondary: #64748b;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;
    /* Booking Status Colors */
    --status-draft: #9ca3af;
    --status-requested: #fbbf24;
    --status-confirmed: #22c55e;
    --status-checkedin: #3b82f6;
    --status-checkedout: #6b7280;
    --status-cancelled: #ef4444;
    /* Cleaning Status Colors */
    --cleaning-planned: #a78bfa;
    --cleaning-assigned: #60a5fa;
    --cleaning-inprogress: #fbbf24;
    --cleaning-done: #22c55e;
    --cleaning-cancelled: #ef4444;
}

/* ═══════════════════════════════════════════════════════════════
   LOADING SCREEN
   ═══════════════════════════════════════════════════════════════ */

.loading-screen {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
    z-index: 9999;
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-logo {
    margin-bottom: 2rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    animation: spin 1s linear infinite;
}

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

.loading-text {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.5px;
}

.loading-subtext {
    font-size: 0.875rem;
    opacity: 0.7;
    margin: 0.5rem 0 0;
}

/* ═══════════════════════════════════════════════════════════════
   ERROR UI
   ═══════════════════════════════════════════════════════════════ */

#blazor-error-ui {
    background: #ef4444;
    bottom: 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 1rem;
    position: fixed;
    width: 100%;
    z-index: 9999;
}

    #blazor-error-ui.visible {
        display: block;
    }

    #blazor-error-ui .error-content {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 1rem;
        color: white;
        max-width: 600px;
        margin: 0 auto;
    }

    #blazor-error-ui .error-icon {
        font-size: 1.5rem;
    }

    #blazor-error-ui a.reload {
        color: white;
        font-weight: 600;
        text-decoration: underline;
        margin-left: 0.5rem;
    }

/* ═══════════════════════════════════════════════════════════════
   LAYOUT OVERRIDES
   ═══════════════════════════════════════════════════════════════ */

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Instrument Sans', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Drawer styling */
.mud-drawer-content {
    scrollbar-width: thin;
}

    .mud-drawer-content::-webkit-scrollbar {
        width: 6px;
    }

    .mud-drawer-content::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.2);
        border-radius: 3px;
    }

/* ═══════════════════════════════════════════════════════════════
   STATUS BADGES
   ═══════════════════════════════════════════════════════════════ */

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

    .status-badge::before {
        content: '';
        width: 8px;
        height: 8px;
        border-radius: 50%;
    }

    /* Booking Status Badges */
    .status-badge.draft {
        background: rgba(156, 163, 175, 0.15);
        color: #6b7280;
    }

        .status-badge.draft::before {
            background: var(--status-draft);
        }

    .status-badge.requested {
        background: rgba(251, 191, 36, 0.15);
        color: #b45309;
    }

        .status-badge.requested::before {
            background: var(--status-requested);
        }

    .status-badge.confirmed {
        background: rgba(34, 197, 94, 0.15);
        color: #15803d;
    }

        .status-badge.confirmed::before {
            background: var(--status-confirmed);
        }

    .status-badge.checkedin {
        background: rgba(59, 130, 246, 0.15);
        color: #1d4ed8;
    }

        .status-badge.checkedin::before {
            background: var(--status-checkedin);
        }

    .status-badge.checkedout {
        background: rgba(107, 114, 128, 0.15);
        color: #4b5563;
    }

        .status-badge.checkedout::before {
            background: var(--status-checkedout);
        }

    .status-badge.cancelled {
        background: rgba(239, 68, 68, 0.15);
        color: #dc2626;
    }

        .status-badge.cancelled::before {
            background: var(--status-cancelled);
        }

/* ═══════════════════════════════════════════════════════════════
   CALENDAR STYLES
   ═══════════════════════════════════════════════════════════════ */

.booking-calendar {
    --cell-height: 52px;
    --header-bg: #f1f5f9;
    --border-color: #e2e8f0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Calendar Header */
.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid var(--border-color);
}

.calendar-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.calendar-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    text-transform: capitalize;
}

.calendar-actions {
    display: flex;
    gap: 0.5rem;
}

.today-btn {
    font-size: 0.875rem !important;
    text-transform: none !important;
}

/* Calendar Legend */
.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0.75rem 1.5rem;
    background: #fafafa;
    border-bottom: 1px solid var(--border-color);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: #64748b;
}

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

    .legend-dot.draft {
        background: var(--status-draft);
    }

    .legend-dot.requested {
        background: var(--status-requested);
    }

    .legend-dot.confirmed {
        background: var(--status-confirmed);
    }

    .legend-dot.checkedin {
        background: var(--status-checkedin);
    }

    .legend-dot.checkedout {
        background: var(--status-checkedout);
    }

    .legend-dot.cancelled {
        background: var(--status-cancelled);
    }

    .legend-dot.external {
        background: #f97316;
    }

/* Calendar Loading */
.calendar-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    gap: 1rem;
    color: #64748b;
}

/* Calendar Container (scrollable) */
.calendar-container {
    overflow-x: auto;
    padding: 1rem;
}

/* Calendar Grid */
.calendar-grid {
    display: grid;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    min-width: max-content;
}

/* Calendar Cells */
.calendar-cell {
    min-height: var(--cell-height);
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    position: relative;
    background: white;
    transition: background-color 0.15s ease;
}

    .calendar-cell:last-child {
        border-right: none;
    }

    /* Header Corner (Wohnung label) */
    .calendar-cell.header-corner {
        background: #1e293b;
        color: white;
        font-weight: 600;
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        display: flex;
        align-items: center;
        justify-content: center;
        position: sticky;
        left: 0;
        z-index: 10;
    }

    /* Day Header Cells */
    .calendar-cell.header-day {
        background: var(--header-bg);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 0.5rem 0.25rem;
        min-width: 44px;
    }

        .calendar-cell.header-day .day-name {
            font-size: 0.625rem;
            text-transform: uppercase;
            color: #64748b;
            font-weight: 500;
        }

        .calendar-cell.header-day .day-number {
            font-size: 0.875rem;
            font-weight: 600;
            color: #1e293b;
        }

        .calendar-cell.header-day.weekend {
            background: #fef3c7;
        }

            .calendar-cell.header-day.weekend .day-name,
            .calendar-cell.header-day.weekend .day-number {
                color: #b45309;
            }

        .calendar-cell.header-day.today {
            background: var(--primary);
        }

            .calendar-cell.header-day.today .day-name,
            .calendar-cell.header-day.today .day-number {
                color: white;
            }

    /* Apartment Name Cells */
    .calendar-cell.apartment-name {
        background: #f8fafc;
        padding: 0.5rem 0.75rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-width: 180px;
        max-width: 180px;
        position: sticky;
        left: 0;
        z-index: 5;
        border-right: 2px solid var(--border-color);
    }

.apartment-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.apartment-code {
    font-size: 0.6875rem;
    color: #64748b;
    margin-top: 2px;
}

/* Day Cells */
.calendar-cell.day-cell {
    cursor: pointer;
    min-width: 44px;
}

    .calendar-cell.day-cell:hover {
        background: rgba(37, 99, 235, 0.05);
    }

    .calendar-cell.day-cell.weekend {
        background: #fffbeb;
    }

        .calendar-cell.day-cell.weekend:hover {
            background: #fef3c7;
        }

    .calendar-cell.day-cell.today {
        background: rgba(37, 99, 235, 0.08);
        box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.3);
    }

    .calendar-cell.day-cell.has-booking {
        cursor: default;
    }

/* Booking Blocks */
.booking-block {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 2px;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 0.6875rem;
    font-weight: 500;
    color: white;
    cursor: pointer;
    overflow: visible;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    z-index: 3;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

    .booking-block:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        z-index: 4;
    }

.booking-guest {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.booking-nights {
    background: rgba(255, 255, 255, 0.25);
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 0.625rem;
    font-weight: 600;
    flex-shrink: 0;
}

/* Cleaning Job Icons */
.cleaning-icon {
    flex-shrink: 0;
    margin-left: 2px;
}

    .cleaning-icon.has-cleaning {
        color: rgba(187, 247, 208, 0.9);
    }

    .cleaning-icon.no-cleaning {
        color: rgba(254, 202, 202, 0.9);
        animation: pulse-warning 2s infinite;
    }

/* Booking ohne Reinigung - AUFFÄLLIG! */
.booking-block.no-cleaning-assigned {
    border: 2px solid #ef4444 !important;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.3), 0 1px 3px rgba(0, 0, 0, 0.15) !important;
    animation: pulse-border 2s infinite;
}

    .booking-block.no-cleaning-assigned::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: repeating-linear-gradient( -45deg, transparent, transparent 4px, rgba(239, 68, 68, 0.1) 4px, rgba(239, 68, 68, 0.1) 8px );
        border-radius: 4px;
        pointer-events: none;
    }

.missing-cleaning-badge {
    position: absolute;
    top: -6px;
    left: -6px;
    width: 18px;
    height: 18px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    animation: bounce-badge 1s infinite;
}

@keyframes pulse-warning {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes pulse-border {
    0%, 100% {
        border-color: #ef4444;
        box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.3), 0 1px 3px rgba(0, 0, 0, 0.15);
    }

    50% {
        border-color: #fca5a5;
        box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.2), 0 1px 3px rgba(0, 0, 0, 0.15);
    }
}

@keyframes bounce-badge {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* Legend Divider */
.legend-divider {
    color: #94a3b8;
    margin: 0 8px;
}

.legend-warning {
    color: #ef4444;
    font-weight: 600;
}

.legend-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    font-size: 11px;
    font-weight: bold;
    margin-right: 4px;
}

/* Status Colors for Booking Blocks */
.booking-block.status-draft {
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
}

.booking-block.status-requested {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #1e293b;
}

.booking-block.status-confirmed {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.booking-block.status-checkedin {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.booking-block.status-checkedout {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
}

.booking-block.status-cancelled {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    opacity: 0.7;
    text-decoration: line-through;
}

.booking-block.status-external {
    background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
    border: 2px dashed #ea580c;
    color: white;
    cursor: pointer;
}

/* Booking Detail Modal */
.booking-detail-content {
    padding: 0.5rem 0;
}

.font-mono {
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.8125rem;
}

/* Responsive Calendar */
@media (max-width: 768px) {
    .calendar-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .calendar-title {
        text-align: center;
    }

    .calendar-nav {
        justify-content: center;
    }

    .calendar-actions {
        justify-content: center;
    }

    .calendar-legend {
        justify-content: center;
    }

    .calendar-cell.apartment-name {
        min-width: 120px;
        max-width: 120px;
    }

    .calendar-cell.day-cell,
    .calendar-cell.header-day {
        min-width: 36px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   DASHBOARD CARDS
   ═══════════════════════════════════════════════════════════════ */

.stat-card {
    position: relative;
    overflow: hidden;
}

    .stat-card::before {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 120px;
        height: 120px;
        background: currentColor;
        opacity: 0.1;
        border-radius: 50%;
        transform: translate(30%, -30%);
    }

    .stat-card .stat-icon {
        width: 48px;
        height: 48px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .stat-card .stat-value {
        font-size: 2rem;
        font-weight: 700;
        line-height: 1.2;
    }

    .stat-card .stat-label {
        font-size: 0.875rem;
        opacity: 0.7;
    }

/* ═══════════════════════════════════════════════════════════════
   DATA TABLES
   ═══════════════════════════════════════════════════════════════ */

.mud-table-dense .mud-table-cell {
    padding: 8px 16px;
}

.clickable-row {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

    .clickable-row:hover {
        background-color: rgba(37, 99, 235, 0.05) !important;
    }

/* ═══════════════════════════════════════════════════════════════
   FORM STYLES
   ═══════════════════════════════════════════════════════════════ */

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

.form-section-title {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--secondary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
}

/* ═══════════════════════════════════════════════════════════════
   QUICK CREATE GUEST PANEL
   ═══════════════════════════════════════════════════════════════ */

.quick-create-panel {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 12px;
    padding: 1.25rem;
    margin-top: 1rem;
}

    .quick-create-panel .panel-header {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        margin-bottom: 1rem;
        color: #0369a1;
        font-weight: 600;
    }

/* ═══════════════════════════════════════════════════════════════
   UTILITIES
   ═══════════════════════════════════════════════════════════════ */

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.page-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state-icon {
    font-size: 4rem;
    opacity: 0.3;
    margin-bottom: 1rem;
}

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .page-header {
        flex-direction: column;
        align-items: stretch;
    }

    .stat-card .stat-value {
        font-size: 1.5rem;
    }
}


/* Tag-Suche Dropdown - Größer und scrollbar */
.tag-search-popover {
    max-height: 400px !important;
    min-width: 320px !important;
    overflow: visible !important;
}

    .tag-search-popover .mud-list {
        max-height: 350px !important;
        overflow-y: auto !important;
    }

    .tag-search-popover .mud-list-item {
        padding: 8px 12px !important;
    }

/* Autocomplete Popovers generell größer */
.mud-autocomplete .mud-popover-cascading-value {
    max-height: 400px !important;
}


/* Badge-Container richtig positionieren */
.mud-appbar .mud-badge-root {
    display: inline-flex;
    position: relative;
    vertical-align: middle;
}

/* Badge kleiner und besser positioniert */
.mud-appbar .mud-badge .mud-badge-badge {
    top: 2px !important;
    right: 2px !important;
    min-width: 16px !important;
    height: 16px !important;
    font-size: 10px !important;
    line-height: 16px !important;
    padding: 0 4px !important;
    transform: scale(0.9) !important;
}

/* Overlap-Badge anpassen */
.mud-appbar .mud-badge-overlap .mud-badge-badge {
    top: 4px !important;
    right: 4px !important;
}

/* Icon-Button in der AppBar */
.mud-appbar .mud-icon-button {
    padding: 8px;
    margin: 0 2px;
}

/* AppBar Overflow verhindern */
.mud-appbar,
.mud-appbar-toolbar {
    overflow: visible;
}

/* ═══════════════════════════════════════════════════════════════
   2. USER-MENU STYLING
   ═══════════════════════════════════════════════════════════════ */

.user-menu-button {
    text-transform: none !important;
    padding: 4px 12px !important;
    border-radius: 20px !important;
}

    .user-menu-button:hover {
        background-color: rgba(255, 255, 255, 0.1) !important;
    }

    .user-menu-button .mud-avatar {
        border: 2px solid rgba(255, 255, 255, 0.3);
    }

/* ═══════════════════════════════════════════════════════════════
   3. TENANT-CHIP IM HEADER
   ═══════════════════════════════════════════════════════════════ */

.tenant-chip {
    border-color: rgba(255, 255, 255, 0.5) !important;
    color: white !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
}

    .tenant-chip .mud-icon-root {
        color: white !important;
    }

/* ═══════════════════════════════════════════════════════════════
   4. RESPONSIVE ANPASSUNGEN
   ═══════════════════════════════════════════════════════════════ */

/* Auf kleinen Bildschirmen User-Name ausblenden */
@media (max-width: 768px) {
    .user-menu-button .user-name-text {
        display: none;
    }

    .tenant-chip {
        display: none !important;
    }
}

/* App-Title auf sehr kleinen Bildschirmen kürzen */
@media (max-width: 480px) {
    .mud-appbar .app-title-full {
        display: none;
    }

    .mud-appbar .app-title-short {
        display: inline;
    }
}

@media (min-width: 481px) {
    .mud-appbar .app-title-short {
        display: none;
    }
}

/* ═══════════════════════════════════════════════════════════════
   AI ASSISTANT - VOICE & CHAT STYLES
   ═══════════════════════════════════════════════════════════════ */

/* Voice Recording Button Animation */
.voice-btn-recording {
    animation: voice-pulse 1.5s ease-in-out infinite;
    position: relative;
}

.voice-btn-recording::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid var(--danger);
    animation: voice-ring 1.5s ease-out infinite;
}

@keyframes voice-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes voice-ring {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.4); opacity: 0; }
}

/* Voice Interim Text */
.voice-interim {
    color: var(--secondary);
    font-style: italic;
    opacity: 0.7;
    padding: 4px 8px;
    border-left: 3px solid var(--primary-light);
    margin-top: 4px;
    font-size: 0.875rem;
}

/* Chat Message Markdown */
.ai-message-content {
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.6;
}

.ai-message-content code {
    background: rgba(0, 0, 0, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.85em;
}

/* Conversation Sidebar */
.conversation-item {
    cursor: pointer;
    transition: background-color 0.15s ease;
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 4px;
}

.conversation-item:hover {
    background-color: rgba(37, 99, 235, 0.08);
}

.conversation-item.active {
    background-color: rgba(37, 99, 235, 0.12);
    border-left: 3px solid var(--primary);
}

/* Suggested Actions */
.ai-suggested-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

/* Voice Language Selector */
.voice-language-chip {
    cursor: pointer;
    transition: all 0.15s ease;
}

.voice-language-chip:hover {
    transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════════════════
   RULE FLOW PREVIEW (Mermaid.js)
   ═══════════════════════════════════════════════════════════════ */

.rule-flow-preview {
    min-height: 120px;
}

.rule-flow-preview.compact {
    min-height: 80px;
}

.rule-flow-preview .mermaid-container {
    overflow-x: auto;
    overflow-y: hidden;
    text-align: center;
}

.rule-flow-preview .mermaid-container svg {
    max-width: 100%;
    height: auto;
}

.rule-flow-preview .mermaid-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    opacity: 0.6;
}

.sticky-preview {
    position: sticky;
    top: 80px;
}

@media (max-width: 1279px) {
    .sticky-preview {
        position: static;
    }
}