/* ============================================================
   Home page styles — extracted from Home.razor
   ============================================================ */

.content-container {
    margin: 0 32px;
}

.title-section {
    background-color: #f9fafb;
    padding-bottom: 28px;
    border-bottom: 1px solid #E2E8EC;
}

.title-logo-row {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px 0 8px;
}

.title-logo {
    width: 160px;
    height: auto;
    display: block;
    flex-shrink: 0;
}

.site-logo-link {
    display: block;
    flex-shrink: 0;
}

.grid-title {
    font-family: "Roboto", sans-serif;
    font-weight: 700;
    text-transform: none;
    font-size: 36px;
    line-height: 1.15;
    color: #5C6670;
}

.grid-body {
    font-family: "Roboto", sans-serif;
    font-size: 15px;
    font-weight: 300;
    color: #575757;
}

.info-box {
    background-color: #f9fafb;
    border: 1px solid #DDDDDD;
    border-radius: 10px;
    padding: 10px 14px;
    margin: 0;
}

.info-box-title {
    font-family: "Roboto", sans-serif;
    font-weight: 500;
    font-size: 12px;
    color: #333333;
    margin: 0 0 8px 0;
}

.info-box-text {
    font-family: "Roboto", sans-serif;
    font-size: 13px;
    color: #6B7580;
    margin: 0;
}

.sections-container {
    background-color: #f9fafb;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 0 32px;
    padding: 24px 0 32px 0;
}

.section-box {
    width: 100%;
}

/* Shared chamfered-corner mixin via gradient overlay.
   Paints four 6 px transparent triangles at each corner over the
   page background (#f9fafb), giving the cut-corner effect without
   clip-path so box-shadows and focus rings are never clipped. */
.box-location,
.box-search,
.box-results {
    --chamfer: 6px;
    --page-bg: #f9fafb;
    background-image:
        linear-gradient(135deg, var(--page-bg) var(--chamfer), transparent var(--chamfer)),
        linear-gradient(225deg, var(--page-bg) var(--chamfer), transparent var(--chamfer)),
        linear-gradient(315deg, var(--page-bg) var(--chamfer), transparent var(--chamfer)),
        linear-gradient(45deg,  var(--page-bg) var(--chamfer), transparent var(--chamfer));
    background-position: top left, top right, bottom right, bottom left;
    background-size: 50% 50%;
    background-repeat: no-repeat;
}

.box-location {
    background-color: #FFFFFF;
    padding: 28px 0 20px 0;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
}

.box-search {
    background-color: #edf7f8;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
}

.box-results {
    background-color: #FFFFFF;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
}

.page-section-heading {
    font-family: "Roboto", sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: #6B7580;
    margin: 16px 0 8px 30px;
}

.selection-message-banner {
    background-color: #FFF4B9;
    border: 1px solid #E5C94A;
    border-radius: 6px;
    padding: 10px 16px;
    margin: 8px 0 12px 0;
}

.selection-message-text {
    font-family: "Roboto", sans-serif;
    font-size: 14px;
    color: #4A3B00;
    margin: 0;
    line-height: 1.5;
}

.selection-message-text + .selection-message-text {
    margin-top: 6px;
}

.search-title {
    font-family: "Roboto", sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: #6B7580;
    margin: 0px 0 16px 30px;
}

.location-container {
    max-width: 400px;
    padding: 0 0 0 30px;
}

/* Flex row that holds the location dropdown + Quick Links button side-by-side */
.location-row {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    padding: 0 0 0 30px;
}

.location-combo-wrapper {
    width: 400px;
    flex: 0 0 400px;
}

.ql-category {
    font-family: "Roboto", sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: #898f65;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 14px 14px 4px 14px;
    margin: 0;
}

.ql-link {
    display: block;
    width: 100%;
    padding: 9px 14px;
    background: none;
    border: none;
    border-bottom: 1px solid #F0F0F0;
    text-align: left;
    font-family: "Roboto", sans-serif;
    font-size: 14px;
    color: #4D7F71;
    cursor: pointer;
    line-height: 1.4;
}

.ql-link:hover {
    background-color: #F5F9F7;
    color: #3D6A5D;
}

.ql-link-synonym {
    color: #9AA3AC;
    font-size: 12px;
    font-style: italic;
    font-weight: 400;
    margin-left: 2px;
}

/* ── Detail window content ── */
.detail-content {
    font-family: "Roboto", sans-serif;
    font-size: 14px;
    color: #5C6670;
    line-height: 1.65;
}

.detail-content h2 {
    font-size: 20px;
    font-weight: 500;
    color: #4D7F71;
    margin: 0 0 4px 0;
}

.detail-content .detail-meta {
    font-size: 12px;
    color: #9AA3AC;
    margin: 0 0 18px 0;
}

.detail-content h3 {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #5C6670;
    margin: 18px 0 6px 0;
    padding-bottom: 4px;
    border-bottom: 1px solid #EEEEEE;
}

.detail-content p {
    margin: 0 0 8px 0;
}

.detail-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 6px 0 10px 0;
}

.detail-content th {
    background-color: #4D7F71;
    color: #FFFFFF;
    text-align: left;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 600;
}

.detail-content td {
    padding: 6px 12px;
    font-size: 13px;
    border-bottom: 1px solid #F0F0F0;
}

.detail-content tr:hover td {
    background-color: #F9FBFA;
}

.detail-content ul, .detail-content ol {
    padding-left: 20px;
    margin: 4px 0 10px 0;
}

.detail-content li {
    margin-bottom: 4px;
}

.detail-placeholder {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background-color: #FFF8E1;
    border: 1px solid #FFD54F;
    border-radius: 4px;
    font-family: "Roboto", sans-serif;
    font-size: 13px;
    color: #795548;
    margin-top: 16px;
}

.location-label {
    font-family: "Roboto", sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: #5C6670;
    margin-bottom: 8px;
    display: block;
}

.location-combobox {
    font-family: "Roboto", sans-serif;
    font-size: 16px;
    border: 2px solid #4D7F71;
    border-radius: 4px;
    background-color: #FFFFFF;
    color: #5C6670;
}

.location-combobox .k-input-inner {
    border-radius: 4px;
}

.location-combobox .k-input-button {
    background-color: #4D7F71;
    border-color: #4D7F71;
    color: #FFFFFF;
}

.location-combobox .k-input-button:hover {
    background-color: #3D6A5D;
    border-color: #3D6A5D;
    color: #FFFFFF;
}

.search-button {
    width: 300px;
    padding: 12px 24px;
    background-color: #4D7F71;
    color: #FFFFFF;
    border: none;
    border-radius: 4px;
    font-family: "Roboto", sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
}

/* TelerikButton renders inner elements; force them to inherit the same flex layout */
.search-button .k-button-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.search-button svg {
    display: block;
}

.search-button:hover {
    background-color: #3D6A5D;
}

.search-button:disabled {
    background-color: #B0B0B0;
    cursor: not-allowed;
    opacity: 0.6;
}

.search-button:disabled:hover {
    background-color: #B0B0B0;
}

.filter-search-container {
    padding: 12px 0 16px 0;
    display: flex;
    justify-content: center;
}

.search-instructions,
.results-status {
    font-family: "Roboto", sans-serif;
    font-size: 14px;
    color: #5C6670;
    margin: 0 30px 12px 30px;
    line-height: 1.5;
}

.results-status {
    padding: 12px 16px;
    background-color: #F5F9F7;
    border: 1px solid #D7E5DF;
    border-radius: 6px;
}

.results-grid-wrapper {
    overflow-x: auto;
}

.results-grid-shell {
    position: relative;
}

.results-grid-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background-color: rgba(249, 250, 251, 0.80);
    z-index: 1;
    pointer-events: none;
}

.results-grid-loading-spinner {
    width: 48px;
    height: 48px;
    border: 5px solid #b3e8ed;
    border-top-color: #00adbb;
    border-radius: 50%;
    animation: grid-spin 0.75s linear infinite;
}

.results-grid-loading-text {
    font-family: "Roboto", sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: #00adbb;
}

@keyframes grid-spin {
    to { transform: rotate(360deg); }
}

.quick-links-helper-text {
    font-family: "Roboto", sans-serif;
    font-size: 14px;
    color: #5C6670;
    margin: 0 0 12px 0;
    line-height: 1.5;
}

/* ── AP Cyto drawer trigger button ── */
.apcyto-trigger-btn {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 0 20px;
    background-color: #4D7F71;
    border: 2px solid #4D7F71;
    border-radius: 6px;
    cursor: pointer;
    font-family: "Roboto", sans-serif;
    white-space: nowrap;
    transition: background-color 0.18s, border-color 0.18s;
    flex-shrink: 0;
    align-self: flex-end;
    height: 52px;
}

.apcyto-trigger-btn:hover {
    background-color: #3D6A5D;
    border-color: #3D6A5D;
}

.apcyto-trigger-icon {
    color: #FFFFFF;
    display: flex;
    align-items: center;
    font-size: 26px;
}

.apcyto-trigger-label {
    font-size: 14px;
    font-weight: 600;
    color: #FFFFFF;
    white-space: nowrap;
    line-height: 1;
}

/* ── AP Cyto slide-in panel ── */
.apcyto-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1000;
    animation: apcyto-fade-in 0.22s ease;
}

@keyframes apcyto-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.apcyto-panel {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 420px;
    max-width: 95vw;
    background: #FFFFFF;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.18);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    animation: apcyto-slide-in 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes apcyto-slide-in {
    from { transform: translateX(-100%); }
    to   { transform: translateX(0); }
}

.apcyto-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 14px 20px;
    border-bottom: 1px solid #EEEEEE;
    flex-shrink: 0;
}

.apcyto-panel-title {
    font-family: "Roboto", sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #4D7F71;
    margin: 0;
}

.apcyto-panel-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #9AA3AC;
    padding: 4px;
    line-height: 1;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.apcyto-panel-close:hover {
    background-color: #F5F5F5;
    color: #5C6670;
}

.apcyto-panel-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 8px 0 24px 0;
}

.filter-label {
    font-family: "Roboto", sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: #5C6670;
    margin: 0 0 6px 0;
    display: block;
}

.filter-disabled {
    opacity: 0.45;
    pointer-events: none;
    user-select: none;
}

.search-fields-wrapper {
    padding: 12px 30px 8px 30px;
}

.search-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 32px;
}

.search-field {
    display: flex;
    flex-direction: column;
}

.search-field .k-input {
    border-color: #00adbb;
    border-radius: 4px;
    font-family: "Roboto", sans-serif;
    font-size: 15px;
}

.search-field .k-input:focus-within {
    border-color: #008fa0;
    box-shadow: 0 0 0 2px rgba(0, 173, 187, 0.2);
}

.navigation-arrows {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.nav-arrow {
    width: 40px;
    height: 40px;
    background-color: #00adbb;
    color: #FFFFFF;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.nav-arrow:hover {
    background-color: #008fa0;
}

.pink-section-top-slim {
    background-color: #f9fafb;
    height: 72px;
}

/* Grid Styles */
.k-grid {
    border: none;
    font-family: "Roboto", sans-serif;
}

.k-grid-header {
    background-color: #FFFFFF;
    border-bottom: 1px solid #DDDDDD;
    padding-inline-end: 0px !important;
}

.k-grid-header .k-header {
    background-color: #FFFFFF;
    border: none;
    border-right: none !important;
    border-left: none !important;
    font-family: "Roboto", sans-serif;
    font-size: 18px;
    line-height: 30px;
    font-weight: 500;
    color: #5C6670;
    padding: 20px 30px;
    text-align: left;
}

.k-grid tbody td {
    border: none;
    border-right: none !important;
    border-left: none !important;
    border-bottom: 1px solid #EEEEEE;
    padding: 6px 30px;
    font-family: "Roboto", sans-serif;
    font-size: 16px;
    line-height: 24px;
    font-weight: 400;
    color: #5C6670;
    vertical-align: middle;
}

.k-grid tbody tr {
    border: none;
}

.k-grid tbody tr:hover {
    background-color: #FAFAFA;
}

.k-grid td {
    border-right: none !important;
    border-left: none !important;
}

.k-grid th {
    border-right: none !important;
    border-left: none !important;
}

.k-grid .k-filter-row .k-filtercell-operator {
    display: none;
}

.k-grid .k-filter-row .k-textbox,
.k-grid .k-filter-row .k-input,
.k-grid .k-filter-row .k-input-inner {
    width: 100%;
}

.test-name-cell {
    font-weight: 400;
    color: #5C6670;
    padding: 4px 0 4px 20px;
}

.synonyms-cell {
    color: #5C6670;
    padding: 4px 0 4px 20px;
}

.updated-cell {
    color: #5C6670;
    padding: 12px 0 12px 20px;
}

.show-more-container {
    text-align: center;
    margin-top: 24px;
    padding-bottom: 32px;
}

.show-more-button {
    padding: 8px 20px;
    background-color: #00adbb;
    color: #FFFFFF;
    border: 1px solid #00adbb;
    border-radius: 4px;
    font-family: "Roboto", sans-serif;
    font-size: 18px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 18px;
}

.show-more-button:hover {
    background-color: #FFFFFF;
    color: #5C6670;
    border: 1px solid #00adbb;
}

.resources-section {
    background-color: #f9fafb;
}

.resources-wrapper {
    margin: 0 32px;
}

.resources-title {
    font-family: "Roboto", sans-serif;
    font-weight: 500;
    font-size: 36px;
    color: #5C6670;
    margin: 0 0 24px 0;
    border-bottom: 1px solid #bcbdbd;
}

.resources-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 32px;
}

.resource-item {
    flex: 0 0 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    position: relative;
    text-decoration: none;
    color: inherit;
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
}

.resource-icon {
    width: 80px;
    height: 80px;
    padding: 16px;
    transition: all 0.3s;
    filter: invert(48%) sepia(12%) saturate(1089%) hue-rotate(118deg) brightness(92%) contrast(88%);
}

.resource-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 112px;
    height: 112px;
    border-radius: 50%;
    background-color: transparent;
    transition: all 0.3s;
    z-index: 0;
}

.resource-item:hover::before {
    background-color: #00adbb;
}

.resource-item .resource-icon {
    position: relative;
    z-index: 1;
}

.resource-item:hover .resource-icon {
    filter: brightness(0) invert(1);
}

.resource-title {
    font-family: "Roboto", sans-serif;
    font-size: 20px;
    line-height: 18px;
    font-weight: 500;
    color: #4D7F71;
    position: relative;
    z-index: 1;
}

.resource-item:hover .resource-title {
    color: #4D7F71;
}

/* Make filter inputs/dropdowns match your border colour */
.filter-container .k-filter .k-input,
.filter-container .k-filter .k-dropdownlist,
.filter-container .k-filter .k-combobox {
    border-color: #00adbb;
    border-radius: 4px;
}

/* Style the AND/OR operator button */
.filter-container .k-filter .k-filter-operator .k-button {
    background-color: #00adbb;
    color: #FFFFFF;
    border: none;
    border-radius: 4px;
}

.filter-container .k-filter .k-filter-operator .k-button:hover {
    background-color: #008fa0;
}

/* Add filter / add group links */
.filter-container .k-filter-toolbar .k-button-flat {
    color: #00adbb;
}

/* Remove button */
.filter-container .k-filter-remove .k-button {
    color: #5C6670;
}

/* Connecting tree lines */
.filter-container .k-filter-lines {
    border-color: #DDDDDD;
}

/* Double the width of the field name dropdown */
.filter-container .k-filter .k-filter-field .k-dropdownlist {
    width: 250px;
}

/* Keep the field / operator / value on one line */
.filter-container .k-filter .k-filter-item {
    flex-wrap: nowrap;
}

/* Hide the Add Group button */
.filter-container .k-filter-toolbar .k-button:nth-child(3) {
    display: none;
}

/* Double the width of the Add Expression button */
.filter-container .k-filter-toolbar .k-button:nth-child(2) {
    padding-inline: 3em;
    background-color: #00adbb;
    color: #FFFFFF;
}

@media (max-width: 1100px) {
    .search-fields-grid {
        grid-template-columns: 1fr 1fr;
    }

    .location-row {
        align-items: stretch;
    }

    .location-combo-wrapper {
        width: 100%;
        flex: 1 1 auto;
    }
}

@media (max-width: 768px) {
    .content-container,
    .resources-wrapper {
        margin: 0 16px;
    }

    .sections-container {
        margin: 0 16px;
        gap: 12px;
        padding: 16px 0 24px 0;
    }

    .title-logo-row {
        gap: 12px;
    }

    .title-logo {
        width: 110px;
    }

    .grid-title {
        font-size: 26px;
        line-height: 1.1;
    }

    .page-section-heading,
    .search-title,
    .search-instructions,
    .results-status {
        margin-left: 16px;
        margin-right: 16px;
    }

    .location-row {
        flex-direction: column;
        gap: 12px;
        padding: 0 16px;
    }

    .search-fields-wrapper {
        padding: 12px 16px 8px 16px;
    }

    .search-fields-grid {
        grid-template-columns: 1fr;
    }

    .filter-search-container {
        padding: 8px 16px 16px 16px;
    }

    .search-button {
        width: 100%;
    }

    .resources-title {
        font-size: 28px;
        margin-bottom: 32px;
    }

    .k-grid-header .k-header,
    .k-grid tbody td {
        padding-left: 16px;
        padding-right: 16px;
    }
}

.view-test-button.k-button-solid {
    background-color: #4D7F71;
    border-color: #4D7F71;
    color: #FFFFFF;
}

.view-test-button.k-button-solid:hover {
    background-color: #3D6A5D;
    border-color: #3D6A5D;
}

/* ── Detail template hierarchy expand/collapse icon: green chevron ── */

/* Position the icon container for the pseudo-element overlay */
.k-grid .k-hierarchy-cell .k-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Hide the default SVG (+ / -) regardless of its specific icon class */
.k-grid .k-hierarchy-cell .k-icon svg {
    opacity: 0;
}

/* Collapsed row → green chevron pointing right */
.k-grid .k-hierarchy-cell .k-icon::before {
    content: '';
    position: absolute;
    width: 9px;
    height: 9px;
    border-right: 2.5px solid #4D7F71;
    border-bottom: 2.5px solid #4D7F71;
    transform: rotate(-45deg);
    margin-top: -1px;
}

/* Expanded row → green chevron pointing down (.k-expanded is added by Telerik on the tr) */
.k-grid .k-table-row.k-expanded .k-hierarchy-cell .k-icon::before {
    transform: rotate(45deg);
    margin-top: 2px;
}

.k-toolbar .k-searchbox .k-input-inner {
    height: 42px;
    font-size: 15px;
}
