/* External resources */
<script src="_content/Blazored.TextEditor/quill-blot-formatter.min.js" > </script >
<script src="_content/Blazored.TextEditor/Blazored-BlazorQuill.js" > </script >
<script src="_content/Radzen.Blazor/Radzen.Blazor.js?v=@(typeof(Radzen.Colors).Assembly.GetName().Version)" > </script >

<link href="_content/Radzen.Blazor/css/default.css" rel="stylesheet" / >
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" >
/* General styles */
html, body {
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
    margin: 0;
    padding: 20px;
}

a, .btn-link {
    color: #006bb7;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

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

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

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

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

/* Loader overlay */
#overlay {
    position: fixed;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
}

.loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 16px solid #f3f3f3;
    border-radius: 50%;
    border-top: 16px solid #3498db;
    width: 70px;
    height: 70px;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(359deg);
    }
}

/* Navigation styles */
.nav-link {
    line-height: 1rem !important;
    height: auto !important;
}

.nav-submenu ul {
    list-style-type: none;
}

/* Backend Page Styles */
.backend-page .page-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
}

.backend-page .edit-container,
.index-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

.backend-page .edit-header,
.index-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.backend-page .header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    z-index: 1;
}

.backend-page .is-active-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
}

.backend-page .action-buttons,
.action-buttons {
    display: flex;
    gap: 10px;
}

/* Radzen Switch styles */
.backend-page .is-active-toggle :global(.rz-switch) {
    vertical-align: middle;
    width: 2.5em;
    height: 1.25em;
    border: none !important;
    outline: none;
    box-shadow: none;
}

.backend-page .is-active-toggle :global(.rz-switch .rz-switch-circle) {
    width: 1em;
    height: 1em;
    top: 0.125em;
    left: 0.125em;
    background-color: white;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    border: none;
}

.backend-page .is-active-toggle :global(.rz-switch.rz-state-active .rz-switch-circle) {
    left: calc(100% - 1.125em);
}

.backend-page .is-active-toggle :global(.rz-switch:not(.rz-state-active)) {
    background-color: #fff;
}

.backend-page .is-active-toggle :global(.rz-switch.rz-state-active) {
    background-color: #e61159;
}

.rz-switch.rz-switch-checked {
    background: limegreen;
}

.rz-switch {
    background: red;
}

/* Content layout */
.backend-page .edit-content {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.backend-page .content-column {
    flex: 1 1 calc(20% - 15px);
    min-width: 200px;
}

.backend-page .main-info {
    flex: 1 1 calc(24% - 15px);
}

.backend-page .contact-info,
.backend-page .settings-credentials {
    flex: 1 1 calc(16% - 15px);
}

.backend-page .notes {
    flex: 1 1 calc(44% - 15px);
}

/* Form styles */
.backend-page .form-group,
.form-group {
    margin-bottom: 15px;
}

.backend-page .form-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

    .backend-page .form-row .form-group {
        flex: 1 1 calc(33.33% - 6.67px);
    }

.backend-page .form-group.postcode {
    flex: 0 1 calc(33.33% - 6.67px);
    margin-top: 15px;
}

.form-control {
    width: 100%;
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

/* Notes styles */
.backend-page .notes-wrapper {
    margin-top: 34px;
}

.backend-page .notes-textarea {
    height: 375px;
}

.backend-page .notes ::deep .rz-html-editor-content {
    height: calc(375px - 40px);
}

.rz-html-editor {
    margin-top: 35px;
    height: 450px !important;
}

/* Typography */
.backend-page h1,
h1 {
    color: #e61159 !important;
    margin: 0;
    font-size: 24px;
}

.backend-page h2 {
    color: #333;
    margin-top: 20px;
    margin-bottom: 15px;
    font-size: 20px;
}

.backend-page h3 {
    color: #444;
    margin-top: 25px;
    margin-bottom: 10px;
    font-size: 18px;
}

/* Side Panel Styles */
.backend-page .side-panel,
.person-search .staff-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100%;
    background-color: white;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease-in-out;
    z-index: 1000;
    overflow-y: auto;
}

    .backend-page .side-panel.open,
    .person-search .staff-panel.open {
        right: 0;
    }

    .backend-page .side-panel .entity-panel-content,
    .person-search .staff-panel-content {
        padding: 20px;
    }

    .backend-page .side-panel h2 {
        margin-top: 0;
        padding-bottom: 10px;
        border-bottom: 1px solid #e0e0e0;
    }

    .backend-page .side-panel .close-panel,
    .person-search .close-panel {
        position: absolute;
        top: 10px;
        right: 10px;
        font-size: 24px;
        background: none;
        border: none;
        cursor: pointer;
    }

    .backend-page .side-panel .entity-item,
    .person-search .staff-item {
        margin-bottom: 10px;
        padding: 10px;
        border: 1px solid #e0e0e0;
        border-radius: 4px;
        position: relative;
        z-index: 1;
    }

/* Button Styles */
.btn {
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: bold;
    transition: background-color 0.3s ease;
    cursor: pointer;
    position: relative;
    z-index: 1
}

.btn-primary {
    background-color: #e61159;
    color: white !important;
    border: none;
}

.btn-secondary {
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ccc;
}

.btn-outline-primary {
    color: #e61159;
    border: 1px solid #e61159;
    background-color: transparent;
}

    .btn-outline-primary:hover {
        color: white;
        background-color: #e61159;
    }

.btn:hover {
    opacity: 0.8;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 14px;
}

/* Search styles */
.search-box,
.search-bar {
    margin-bottom: 20px;
    width: 300px;
    position: relative;
}

    .search-box input,
    .search-bar input {
        width: 100%;
        padding: 10px;
        border: 1px solid #ccc;
        border-radius: 20px;
        font-size: 16px;
    }

.search-icon-after {
    height: 15px;
    float: right;
    margin-right: 10px;
    margin-top: -30px;
    position: relative;
    z-index: 2;
    color: black;
}

/* Table and QuickGrid styles */
.quick-grid-container,
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #e61159;
    border-radius: 8px;
    overflow: hidden;
}

.quick-grid-header th,
th {
    background-color: #e61159;
    color: white;
    padding: 10px;
    text-align: left;
    text-transform: uppercase;
}

    .quick-grid-header th:first-child,
    th:first-child {
        border-top-left-radius: 8px;
    }

    .quick-grid-header th:last-child,
    th:last-child {
        border-top-right-radius: 8px;
    }

.quick-grid-row:last-child td:first-child,
tr:last-child td:first-child {
    border-bottom-left-radius: 8px;
}

.quick-grid-row:last-child td:last-child,
tr:last-child td:last-child {
    border-bottom-right-radius: 8px;
}

.quick-grid-row td,
td {
    padding: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.quick-grid-row:last-child td,
tr:last-child td {
    border-bottom: none;
}

.quick-grid-row:nth-child(even),
tr:nth-child(even) {
    background-color: #f2f2f2;
}

.quick-grid-row:nth-child(odd),
tr:nth-child(odd) {
    background-color: #ffffff;
}

/* Pagination styles */
.pagination {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 20px;
}

    .pagination button {
        background-color: #e61159;
        color: white;
        border: none;
        padding: 5px 15px;
        margin: 0 5px;
        border-radius: 4px;
        cursor: pointer;
    }

        .pagination button:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

    .pagination span {
        margin: 0 10px;
    }

/* Alert styles */
.alert {
    margin-top: 20px;
    padding: 12px;
    border-radius: 4px;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

/* Edit container styles */
.nh-edit-container,
.site-edit-container {
    padding: 20px;
    border-radius: 10px;
    background-color: #f5f5f5;
}

.nh-content,
.site-content {
    display: flex;
    gap: 20px;
}

.left-column,
.center-column,
.right-column {
    flex: 1;
}

/* Additional components */
.important-notes,
.portal-credentials {
    background-color: #fff;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.site-list,
.user-list,
.backend-page .entity-search .entity-list,
.backend-page .entity-search .assigned-entity-list,
.person-search .staff-list,
.person-search .assigned-staff-list {
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
    margin-top: 10px;
}

.site-item,
.user-item,
.backend-page .entity-search .entity-item,
.person-search .staff-item {
    background-color: #fff;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-info,
.user-info,
.backend-page .entity-search .entity-info,
.person-search .staff-info {
    display: flex;
    flex-direction: column;
}

.html-viewer {
    border: 1px solid #ccc;
    padding: 10px;
    margin-bottom: 10px;
    min-height: 100px;
    max-height: 300px;
    overflow-y: auto;
}

.html-editor textarea {
    width: 100%;
    min-height: 100px;
}

/* Edit link style */
.edit-link {
    color: #e61159;
    text-decoration: none;
}

    .edit-link:hover {
        text-decoration: underline;
    }

/* QuickGrid specific styles */
::deep .quick-grid {
    border: none;
}

::deep .quick-grid-container {
    border: 1px solid #e61159;
    border-radius: 8px;
    overflow: hidden;
}

::deep .quick-grid-header {
    background-color: #e61159;
}

::deep .quick-grid-cell {
    padding: 10px;
}

::deep .quick-grid-column-header {
    color: white;
    font-weight: bold;
    text-transform: uppercase;
}

::deep .quick-grid-row-alternate {
    background-color: #f2f2f2;
}

/* Entity search styles */
.backend-page .entity-search {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    z-index: 999;
    pointer-events: none;
}

    .backend-page .entity-search.open {
        display: block;
        pointer-events: auto;
        background-color: rgba(0, 0, 0, 0.5);
    }

    .backend-page .entity-search .entity-panel {
        position: fixed;
        top: 0;
        right: -400px;
        width: 400px;
        height: 100%;
        background-color: white;
        box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease-in-out;
        z-index: 1000;
    }

        .backend-page .entity-search .entity-panel.open {
            right: 0;
        }

    .backend-page .entity-search .entity-panel-content {
        padding: 20px;
        height: 100%;
        overflow-y: auto;
        position: relative;
        z-index: 1;
    }

    .backend-page .entity-search .close-panel {
        position: absolute;
        top: 10px;
        right: 10px;
        font-size: 24px;
        background: none;
        border: none;
        cursor: pointer;
        z-index: 2;
    }

    .backend-page .entity-search .entity-item {
        display: flex;
        align-items: center;
        gap: 15px;
        margin-bottom: 15px;
        padding: 10px;
        border-radius: 8px;
        background-color: #f8f9fa;
        transition: background-color 0.2s ease;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        position: relative;
        z-index: 1;
    }

        .backend-page .entity-search .entity-item:hover {
            background-color: #e9ecef;
        }

    .backend-page .entity-search .entity-avatar {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: bold;
        color: white;
        font-size: 18px;
    }

        .backend-page .entity-search .entity-avatar img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 50%;
        }

    .backend-page .entity-search .entity-name {
        font-weight: bold;
        font-size: 16px;
        color: #333;
    }

    .backend-page .entity-search .entity-email,
    .backend-page .entity-search .entity-phone {
        font-size: 14px;
        color: #666;
        display: flex;
        align-items: center;
        gap: 5px;
    }

        .backend-page .entity-search .entity-email ::deep .rz-icon,
        .backend-page .entity-search .entity-phone ::deep .rz-icon {
            font-size: 1rem;
        }

    .backend-page .entity-search .entity-item .btn {
        align-self: center;
        position: relative;
        z-index: 2;
    }

    .backend-page .entity-search .entity-item .remove-button {
        position: relative;
        z-index: 2;
    }

/* Responsive styles */
@media (max-width: 768px) {
    .index-header,
    .backend-page .edit-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .action-buttons,
    .backend-page .header-actions {
        margin-top: 10px;
    }

    .search-box,
    .search-bar {
        width: 100%;
    }

    .nh-content,
    .site-content,
    .backend-page .edit-content {
        flex-direction: column;
    }
}

/* Custom scrollbar styles */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: #555;
    }

/* Print styles */
@media print {
    .index-container,
    .backend-page .edit-container {
        box-shadow: none;
    }

    .action-buttons,
    .search-box,
    .pagination,
    .backend-page .header-actions {
        display: none;
    }

    .quick-grid-container,
    table {
        border: 1px solid #000;
    }

    th {
        background-color: #f0f0f0 !important;
        color: #000 !important;
    }
}

/* Modal Styles */
.backend-page .modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

    .backend-page .modal.is-active {
        display: flex;
        align-items: center;
        justify-content: center;
    }

.backend-page .modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
}

.backend-page .modal .box {
    background-color: white;
    border-radius: 6px;
    box-shadow: 0 0.5em 1em -0.125em rgba(10,10,10,.1), 0 0 0 1px rgba(10,10,10,.02);
    padding: 1.25rem;
}

/* Utility classes */
.mt-3 {
    margin-top: 1rem;
}