﻿:root {
    --ct-primary: #13224B;          /* Navy */
    --ct-secondary: #8BC53F;        /* Lime */
    --ct-background-light: #F5F7FA; /* Subtle light background */
    --ct-background-dark: #1e1e1e;
    --ct-surface-light: #ffffff;
    --ct-surface-dark: #2a2a2a;
    --ct-text-light: #13224B;
    --ct-text-dark: #EAEFF5;
}

/* Shared loading styles */
.ticket-spinner-container .mud-progress-circular-svg circle {
    stroke: var(--ct-primary) !important;
}

/* MudTable linear loading bar (server paging) */
.mud-table .mud-progress-linear .mud-progress-linear-bar {
    background-color: var(--ct-primary) !important;
}
.mud-table .mud-progress-linear .mud-progress-linear-buffer {
    background-color: var(--ct-secondary) !important;
    opacity: .35;
}

/* Customer / Building combined cell styling */
.customer-building-cell .building-chip {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--ct-secondary);
    color: #0F1836; /* darker navy for contrast */
    font-size: 0.70rem;
    font-weight: 600;
    letter-spacing: .5px;
    margin-top: 2px;
}
.customer-building-cell .customer-name {
    font-weight: 600;
    color: var(--ct-primary);
    line-height: 1.1rem;
}

/* Existing styles */
.ticket-unassigned-row {
    background-color: #F0F6E8 !important; /* tinted by secondary */
}

/* TicketDetails Styles */
.ticket-details-paper {
    background: var(--ct-surface-light);
    position: relative;
}

.ticket-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    gap: 8px;
}

.ticket-back-btn {
    min-width: 90px;
    font-weight: 500;
    border-radius: 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    padding-left: 16px;
    padding-right: 16px;
}

.ticket-title {
    font-weight: 600;
    margin-left: auto;
}

.ticket-section-title {
    font-weight: 700;
    margin-top: 18px;
    margin-bottom: 6px;
    letter-spacing: 0.02em;
    color: var(--ct-primary);
    font-size: 1.13em;
}

.ticket-problem-paper {
    background: #f8f8f8;
}

.ticket-image-paper {
    text-align: center;
}

.ticket-image {
    max-width: 100%;
    max-height: 120px;
    border-radius: 6px;
}

/* Address Card */
.ticket-address-card {
    background: #f6faf2; /* subtle lime-tinted */
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.03);
    border: 1px solid #e0e0e0;
    margin-bottom: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 18px 0;
}

.ticket-address-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.ticket-address-mainicon {
    font-size: 2.2em;
    margin-bottom: 8px;
    color: var(--ct-primary);
}

.ticket-address-content {
    text-align: center;
}

.ticket-address-roomname {
    font-weight: 600;
    font-size: 1.1em;
    margin-bottom: 2px;
}

.ticket-address-building,
.ticket-address-street,
.ticket-address-plzcity {
    color: #335;
    font-size: 1em;
    margin-bottom: 1px;
}

.ticket-assign-select {
    max-width: 300px;
}

.ticket-status-select {
    max-width: 220px;
    font-weight: 600;
    background: #f8f8f8;
    border-radius: 8px;
}

.ticket-status-chip {
    min-width: 110px;
    text-align: center;
    font-size: 1em;
    border-radius: 8px;
    margin: 0 2px;
    letter-spacing: 0.01em;
}

.ticket-comment-section {
    background: #f8f8f8;
    border-radius: 10px;
}

.ticket-comment-item {
    padding-bottom: 4px;
}

.ticket-comment-input-row {
    margin-top: 12px;
    gap: 8px;
}

.ticket-comment-input {
    width: 100%;
    background: #fff;
    border-radius: 6px;
}

.ticket-comment-send-btn {
    border-radius: 50%;
    min-width: 48px;
    min-height: 48px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.show-closed-checkbox {
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 0 4px;
    min-width: 0;
    font-size: 0.98em;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

@media (max-width: 900px) {
    .show-closed-checkbox {
        justify-content: flex-start;
        margin-top: 8px !important;
        margin-bottom: 2px !important;
        font-size: 0.97em;
    }
}

.ticket-spinner-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 180px;
    width: 100%;
}

@media (max-width: 600px) {
    .ticket-header-row {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

    .ticket-back-btn {
        min-width: 70px;
        padding-left: 10px;
        padding-right: 10px;
        font-size: 0.98em;
    }

    .ticket-title {
        margin-left: 0;
        text-align: right;
    }

    .ticket-address-card {
        padding: 10px 6px !important;
    }

    .ticket-comment-input-row {
        gap: 6px;
    }

    .ticket-comment-send-btn {
        align-self: flex-end;
        min-width: 44px;
        min-height: 44px;
    }
}

/* Top bar responsive fixes */
.ticket-topbar-grid {
    overflow-x: hidden;
}
.ticket-topbar {
    flex-wrap: wrap;
    gap: 8px;
}
.ticket-topbar > .mud-stack-item { /* ensure inner items shrink */
    min-width: 0;
}
.ticket-topbar .filter-field {
    max-width: 100% !important;
}
.ticket-topbar-actions {
    margin-left: auto;
    flex-wrap: wrap;
}
@media (max-width: 600px) {
    .ticket-topbar-actions {
        margin-left: 0 !important;
        width: 100%;
        justify-content: flex-start;
    }
}

/* Prevent global horizontal scroll on container/table */
.mud-container {
    overflow-x: hidden;
}
.mud-table {
    overflow-x: auto;
}

.chip-align-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
    width: 100%;
}