@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

cursor-pointer {
    cursor: pointer;
}

.cm-drawer {
    display: flex;
    flex-shrink: 0;
    flex-grow: 1;
    flex: 0 0 auto;
    outline: 0;
    position: fixed;
    z-index: var(--mud-zindex-drawer);
    flex-direction: column;
    color: var(--mud-palette-drawer-text);
    background-color: var(--mud-palette-drawer-background);
    --mud-drawer-content-height: 0;
}
h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

text-sm {
    font-size: 0.875rem; /* 14px */
    line-height: 1.25rem; /* 20px */
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.cm-tablerow-disabled {
    color: orange !important;
}

.cm-tablerow-deleted {
    color: red !important;
    text-decoration: line-through !important;
    text-decoration-color: black !important;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPj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1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

.mud-table-pagination {
    overflow: hidden !important;
    align-content: flex-start !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    height: 100px !important;
    min-height: 100px !important;
    max-height: 100px !important;
    color: var(--mud-theme-on-surface);
    font-size: .875rem;
    display: initial;
}

.cm-table-selected {
    background-color: #e6e6e6 !important;
}
.cm-table-cell-selected {
    background-color: #E5E8E8 !important;
}

.mud-table-pagination {
    overflow: hidden !important;
    align-content: flex-start !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    height: 80px !important;
    min-height: 80px !important;
    max-height: 80px !important;
}

.mud-table-pagination > .mud-toolbar {
    justify-content: center !important;
}

/*.cm-list-detail {
    visibility: @DetailVisibility;
}*/

.cm-list-selected {
    background-color: #e6e6e6 !important;
}

.cm-first-column {
    position: relative;
    height: 100%;
}

.cm-first-column {
    position: relative;
    height: 100%;
    min-height: 100%;
}

.cm-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(128, 128, 128, 0.4);
    z-index: 1000;
    pointer-events: all;
}

/* Remove any shadows from MudBlazor layout components */
.mud-layout,
.mud-main-content,
.mud-drawer,
.mud-drawer-content {
    box-shadow: none !important;
}

.bootstrap-progress {
    width: 220px;
    height: 6px;
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
    margin: 12px auto 4px;
    overflow: hidden;
}


.bootstrap-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    transition: width 0.4s ease;
}

.bootstrap-progress-label {
    color: #475569;
    font-size: 0.85rem;
    text-align: center;
}

.bootstrap-status-dialog {
    max-width: 400px;
}

.bootstrap-status-overlay {
    background: rgba(247, 249, 253, 0.92);
    backdrop-filter: blur(12px);
}

.bootstrap-loading-body {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    background: linear-gradient(160deg, #f6f7fb 0%, #eef2f7 60%, #e0e7f1 100%);
    color: #1f2937;
    font-family: 'Roboto', 'Segoe UI', sans-serif;
}

.bootstrap-loading-backdrop {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.bootstrap-loading-card {
    width: min(520px, calc(100vw - 48px));
    padding: 38px 42px 32px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 28px 60px rgba(15, 23, 42, 0.16);
    backdrop-filter: blur(12px);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.bootstrap-loading-card .loading-brand {
    font-size: 2.3rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: #0f172a;
}

.bootstrap-loading-card .loading-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
}

.bootstrap-loading-card .loading-spinner {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 3px solid rgba(37, 99, 235, 0.22);
    border-top-color: #2563eb;
    animation: initial-loading-spin 1s linear infinite;
}

.bootstrap-loading-card .loading-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
}

.bootstrap-loading-card .loading-message {
    color: #334155;
    font-size: 1rem;
    line-height: 1.45;
}

.bootstrap-loading-card .loading-subtext {
    color: #64748b;
    font-size: 0.95rem;
}

.bootstrap-loading-card .loading-progress {
    margin-top: 6px;
    height: 6px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.14);
    overflow: hidden;
}

.bootstrap-loading-card .loading-progress-bar {
    width: 45%;
    height: 100%;
    background: linear-gradient(90deg, rgba(37, 99, 235, 0), rgba(37, 99, 235, 0.55), rgba(37, 99, 235, 0));
    animation: initial-loading-sweep 2.4s ease-in-out infinite;
}

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

@keyframes initial-loading-sweep {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(120%); }
    100% { transform: translateX(120%); }
}

@media (max-width: 540px) {
    .bootstrap-loading-card {
        padding: 30px 26px 26px;
        gap: 16px;
    }

    .bootstrap-loading-card .loading-brand {
        font-size: 2rem;
    }
}

.task-header {
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(var(--mud-palette-primary-rgb), 0.08), rgba(var(--mud-palette-surface-rgb), 0.95));
    box-shadow: var(--mud-elevation-4);
    border: 1px solid rgba(var(--mud-palette-primary-rgb), 0.1);
}

.task-tabs .mud-tabs-toolbar {
    border-bottom: none;
    padding-inline: 1.5rem;
}

.task-tabs .mud-tabpanel {
    padding: 0;
}

.task-overview {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.5rem;
    overflow-y: auto;
    background-color: var(--mud-palette-background);
    border-radius: 18px;
}

.task-overview-grid {
    width: 100%;
}

.task-summary-card .mud-card-content,
.task-summary-card .mud-card-actions {
    padding: 0;
}

.task-summary-grid {
    margin-top: 0.75rem;
}

.task-summary-tile {
    background-color: var(--mud-palette-surface);
    border-radius: 16px;
    border: 1px solid var(--mud-palette-lines-default);
    box-shadow: var(--mud-elevation-2);
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-height: 100%;
}

.task-summary-label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--mud-palette-text-secondary);
}

.task-body {
    background-color: var(--mud-palette-surface);
    border-radius: 16px;
    border: 1px solid var(--mud-palette-lines-default);
    padding: 1.25rem 1.5rem;
    color: var(--mud-palette-text-primary);
}

.task-team-card .mud-card-content {
    padding: 0;
}

.task-contact-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
}

.task-contact-item {
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 14px;
    padding: 0.75rem 1rem;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.task-contact-item:hover {
    box-shadow: var(--mud-elevation-5);
    transform: translateY(-2px);
}

.task-quick-time-card {
    border-radius: 20px;
    border: 1px solid rgba(var(--mud-palette-primary-rgb), 0.12);
    box-shadow: var(--mud-elevation-4);
}

.task-quick-time-grid {
    align-items: stretch;
}

.task-quick-time-assignee {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border-radius: 16px;
    border: 1px solid rgba(var(--mud-palette-primary-rgb), 0.18);
    background-color: rgba(var(--mud-palette-primary-rgb), 0.04);
    padding: 1rem;
}

.task-quick-time-actions {
    padding: 1rem 1.5rem;
}

.task-editor-content {
    padding: 1rem 1.5rem;
    background-color: var(--mud-palette-surface);
    border-radius: 18px;
    border: 1px solid var(--mud-palette-lines-default);
    box-shadow: var(--mud-elevation-3);
}

.task-editor-overlay {
    background-color: rgba(255, 255, 255, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
}

@media (max-width: 768px) {
    .task-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .task-tabs .mud-tabs-toolbar {
        padding-inline: 1rem;
    }

    .task-overview {
        padding: 1rem;
    }
}
