html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}
/* Org Chart Styles */
.chart-container {
    background-color: #f8f9fa;
    background-image: radial-gradient(circle, #dee2e6 1px, transparent 1px);
    background-size: 20px 20px;
}

.org-chart {
    width: fit-content;
    margin: 0;
    display: flex;
    justify-content: center;
    padding: 20px;
}

.org-tree {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.seat-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.seat-card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 12px;
    min-width: 220px;
    max-width: 280px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: relative;
}

.seat-card:hover {
    border-color: #0d6efd;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.seat-card.vacant {
    border-style: dashed;
}

.seat-header {
    flex-direction: column;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 8px;
    position: relative;
}

.seat-avatar {
    line-height: 48px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0d6efd, #0a58ca);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
}

.seat-avatar.vacant {
    background: #e9ecef;
    color: #6c757d;
}

.seat-menu {
    position: absolute;
    top: 0;
    right: 0;
}

.seat-title {
    font-weight: 600;
    text-align: center;
    color: #212529;
    margin-bottom: 4px;
}

.seat-holder {
    text-align: center;
    color: #6c757d;
    font-size: 0.875rem;
    margin-bottom: 8px;
}

.seat-holder.vacant-text {
    color: #0d6efd;
    font-size: 0.8rem;
}

.seat-responsibilities {
    border-top: 1px solid #e9ecef;
    padding-top: 8px;
    font-size: 0.8rem;
}

.responsibilities-header {
    font-weight: 600;
    color: #495057;
    margin-bottom: 4px;
}

.seat-responsibilities ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.seat-responsibilities li {
    color: #6c757d;
    padding: 2px 0;
    padding-left: 12px;
    position: relative;
}

.seat-responsibilities li::before {
    content: "\2022";
    position: absolute;
    left: 0;
    color: #0d6efd;
}

.seat-responsibilities li.more {
    color: #0d6efd;
    font-style: italic;
}

.seat-actions {
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
}

.seat-actions .add-child {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0d6efd;
    opacity: 0;
    transition: opacity 0.2s;
}

.seat-card:hover .seat-actions .add-child {
    opacity: 1;
}

.seat-actions .add-child:hover {
    background: #0d6efd;
    color: white;
}

.seat-children {
    display: flex;
    gap: 20px;
    padding-top: 40px;
    position: relative;
}

/* Tree lines */
.seat-children::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 20px;
    background: #dee2e6;
}

.seat-children > .seat-node {
    position: relative;
}

.seat-children > .seat-node::before {
    content: "";
    position: absolute;
    top: -20px;
    left: 50%;
    width: 2px;
    height: 20px;
    background: #dee2e6;
}

/* Horizontal connector for multiple children */
.seat-children > .seat-node:not(:only-child)::after {
    content: "";
    position: absolute;
    top: -20px;
    height: 2px;
    background: #dee2e6;
}

.seat-children > .seat-node:first-child:not(:only-child)::after {
    left: 50%;
    right: -10px;
}

.seat-children > .seat-node:last-child:not(:only-child)::after {
    left: -10px;
    right: 50%;
}

.seat-children > .seat-node:not(:first-child):not(:last-child)::after {
    left: -10px;
    right: -10px;
}

/* Offcanvas adjustments */
.offcanvas.show {
    z-index: 1050;
}

.offcanvas-backdrop {
    z-index: 1040;
}

/* Drag and Drop Styles */
.seat-card.dragging {
    opacity: 0.5;
    transform: scale(0.95);
}

.seat-card.drop-target {
    border-color: #0d6efd;
    border-width: 2px;
    background-color: #e7f1ff;
}

.seat-node.sorting {
    opacity: 0.7;
}

.seat-node.drop-before::before {
    content: "";
    position: absolute;
    left: -12px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #0d6efd;
    border-radius: 2px;
}

.seat-node.drop-after::after {
    content: "";
    position: absolute;
    right: -12px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #0d6efd;
    border-radius: 2px;
}

.seat-children > .seat-node {
    position: relative;
}

/* Expand/Collapse Button */
.expand-toggle {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 2px 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    color: #6c757d;
    font-size: 0.75rem;
    margin-right: 4px;
}

.expand-toggle:hover {
    background: #f8f9fa;
    color: #0d6efd;
    border-color: #0d6efd;
}

.expand-toggle .child-count {
    font-weight: 600;
}

.seat-actions {
    position: absolute;
    bottom: -14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
}

.seat-menu button {
    opacity: 0.5;
    transition: opacity 0.2s;
}

.seat-card:hover .seat-menu button {
    opacity: 1;
}

/* Horizontal scrolling for large charts */
.chart-container {
    overflow: auto;
    max-height: calc(100vh - 200px);
}

.org-chart {
    width: fit-content;
    margin: 0;
    min-width: max-content;
}

.seat-children {
    flex-wrap: nowrap;
}

/* Print styles - ensure chart fits on page */
@media print {
    .chart-container {
        overflow: visible !important;
        max-height: none !important;
    }
    
    .org-chart {
    width: fit-content;
    margin: 0;
        min-width: auto !important;
        transform-origin: top left;
    }
    
    .seat-children {
        flex-wrap: nowrap !important;
    }
}
