/* Carta-inspired flat design overrides */

/* Flat cards and papers — border instead of shadow */
.mud-card,
.mud-paper {
    box-shadow: none !important;
    border: 1px solid #e5e7eb;
}

/* Flat app bar with bottom border */
.mud-appbar {
    box-shadow: none !important;
    border-bottom: 1px solid #e5e7eb;
}

/* Flat drawer with right border */
.mud-drawer {
    box-shadow: none !important;
    border-right: 1px solid #e5e7eb;
}

/* Squared-off chips */
.mud-chip {
    border-radius: 4px;
}

/* Dialog: subtle shadow + border */
.mud-dialog {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08) !important;
    border: 1px solid #e5e7eb;
}

/* Table header styling */
.mud-table-head th {
    text-transform: uppercase;
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    color: #6b7280;
}

/* Nav link hover and active states */
.mud-nav-link:hover {
    background-color: #f3f4f6 !important;
}

.mud-nav-link.active {
    background-color: #f3f4f6 !important;
}

/* Input outline border colors */
.mud-input-outlined .mud-input-outlined-border {
    border-color: #d1d5db;
}

.mud-input-outlined:hover .mud-input-outlined-border {
    border-color: #9ca3af;
}

/* Full-screen procedure execution overlay */
.procedure-execution-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 1300;
    background: #ffffff;
    display: flex;
    flex-direction: column;
}

.procedure-execution-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    padding-bottom: 140px;
    min-height: 0;
}

.procedure-execution-bottombar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    border-top: 1px solid #e5e7eb;
    padding: 12px 16px;
    z-index: 1301;
}

/* ===== MOBILE RESPONSIVENESS ===== */

/* Override MudBlazor striped rows: first row white, even rows colored */
.mud-table-striped .mud-table-container .mud-table-root .mud-table-body .mud-table-row:nth-of-type(odd) {
    background-color: transparent !important;
}
.mud-table-striped .mud-table-container .mud-table-root .mud-table-body .mud-table-row:nth-of-type(even) {
    background-color: var(--mud-palette-table-striped) !important;
}

/* Column hiding utility — hidden on xs (<600px), visible on sm+ */
.col-hide-xs {
    display: table-cell;
}

/* Tenant name truncation in AppBar */
.appbar-tenant-name {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    vertical-align: middle;
}

/* Procedure header actions wrap */
.procedure-header-actions {
    flex-wrap: wrap;
}

@media (max-width: 599.98px) {
    /* Reduce main content padding on mobile */
    .mud-main-content {
        padding: 56px 8px 8px 8px !important;
    }

    /* Hide columns marked for xs hiding */
    .col-hide-xs {
        display: none !important;
    }

    /* Tenant name — tighter truncation on phone */
    .appbar-tenant-name {
        max-width: 120px;
    }

    /* Procedure detail: stack image + text vertically */
    .procedure-header-layout {
        flex-direction: column !important;
    }

    .procedure-header-layout .procedure-header-image {
        width: 80px !important;
        height: 80px !important;
    }

    .procedure-header-layout .version-selector {
        max-width: 100% !important;
    }

    /* Execution overlay: tighter spacing */
    .procedure-execution-content {
        padding: 8px;
        padding-bottom: 160px;
    }

    .procedure-execution-bottombar {
        padding: 8px 12px;
    }

    .procedure-execution-bottombar .mud-button {
        min-width: 80px !important;
    }

    /* Execution summary: constrain comment width */
    .execution-summary-comment {
        max-width: 120px !important;
    }
}

/* Mobile card list — alternating background for visual separation */
.mobile-card-list .mud-card:nth-child(even) {
    background-color: #f9fafb;
}
