/* --------------------------------------------------------------------------
   1. Homepage
   -------------------------------------------------------------------------- */

.hero-inner {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.introductory-text {
    font-size: 20px;
}

.quicklink-outer {
    background-color: #E5F4FB;
    border-radius: 15px;
    padding: 30px 40px;
    height: 100%;
    overflow: hidden;
    
}

.quicklink-inner {
        display: flex;
        align-items: center;
        height: 100%;
    
}

.quicklink-depth-1 {
    height: 100%;
}

.quick-link-image {
    width: 100%;
    height: auto;
    position: relative;
}

@media (max-width: 1199px) {
    .quick-link-image {
        top: inherit;
    }
    .quicklink-depth-1 {
        height: 100%;
    }
    .quicklink-inner {
        height: 100%;

    }
}
@media (max-width: 768px) {
    .quicklink-outer {
        padding: 30px;

    }
    .position-md-absolute {
        position: relative !important;
    }
}

.be-section {
    padding-top: 90px;
    padding-bottom: 90px;
}

.subheading {
    font-size: 20px;
    color:var(--primary-content-color);
}

/* --------------------------------------------------------------------------
   2. Search Inputs and results
   -------------------------------------------------------------------------- */

.search-box {
    display: flex;
    align-items: stretch;
    
    border-radius: 8px;
    overflow: hidden;
    max-width: 100%;
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    padding: 16px 20px;
    font-size: 1rem;
    color: #555;
    background: #fff;
}

.search-box input::placeholder {
    color: var(--primary-content-color);
}

.search-box input,
input[type="text"],
input[type="search"],
.form-control {
    border: 1px solid var(--color-primary) !important; 
}

/* Input - round left corners only */
.search-box input {
    border: 1px solid var(--color-primary) !important;
    border-radius: 8px 0 0 8px !important;
    border-right: none !important;
}

/* Button - round right corners only */
.search-box button {
    border-radius: 0 8px 8px 0 !important;
}

.search-box:has(input:focus) {
    border-color: var(--color-primary);
    outline: 3px solid var(--color-focus) !important;
    box-shadow: 0 0 0 0;
}

label {
    display: block;
    margin-bottom: 20px;
    font-size: 1rem;
    color: var(--primary-content-color);
    font-weight: 800;
}

@media (max-width: 430px) {
    label {
        font-size: 14px;
    }
}

.label-select {
    display: inline-block;
    margin-bottom: 20px;
    font-size: 1rem;
    color: var(--primary-content-color);
    font-weight: normal;
}

.search-box button {
    background: var(--color-primary);
    border: none;
    padding: 0 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.search-box button:hover {
    background-color: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
}

.search-box button:focus {
    background-color: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
}

.search-box button:focus-visible {
    border-color: var(--color-primary-hover);
    box-shadow: 0 0 0 0;
    color: #ffffff;
    fill: #ffffff;
    background-color: var(--color-primary-hover) !important;
    outline: 3px solid var(--color-focus);
    outline-offset: -3px;
}

.search-box button svg {
    width: 26px;
    height: 26px;
    color: #fff;
}

.search-box button:focus-visible svg {
    color: #ffffff;
}

.bulk-compare, .bulk-herd, .select-all, .bulk-remove {
    text-align: left;
    min-height: 60px;
}

.button-group .bulk-compare {
    min-height: auto;
    padding-left: 15px;
    padding-right: 15px;
}

@media (max-width: 1399px) {
    .bulk-compare, .bulk-herd, .select-all, .bulk-remove {
        text-align: center;
    }
}

@media (max-width: 600px) {
    .bulk-compare, .bulk-herd, .select-all, .bulk-remove {
        text-align: left;
    }
}

.form-select {
    width: 100%;
    min-height: 60px;
    padding-left: 15px;
    border-color: #6c757d;
}

/* Search Results */

@media (max-width: 455px) {
    .btn .badge {
        font-size: 10px;
    }
}

.mobile-show {
    display: none;
}

.table {
    font-size: 15px;
    line-height: 1.2;
    background: transparent;
    border-color: var(--color-primary);
    border-radius: 8px;
    overflow: hidden;
}



tbody {
    font-size: 17px;
}

.table td, .table th {
    padding: 0.9rem;
}

.table th {
    color: var(--primary-content-color);
    vertical-align: text-bottom;
}

.table td {
    vertical-align: middle;
}

td.col-right {
    text-align: right;
}

@media (max-width: 1199px) {
    td.col-right {
        text-align: left;
    }
}

.table-caption {
    display: none;
}

#search-table .form-check-input {
    margin-top: 0;
    margin-right: 5px;
    
}

.first-col {
    width: 350px;
}

.last-col {
    width: auto;
}

@media (max-width: 1199px) {
    .table td.full-col,
    .table th.full-col {
        display: inline-block;
        width: 50%;
        font-size: 16px;
        padding: 1rem;
    }

    .first-col {
        background-color: #d4ebf7 !important;
        display: block;
        width: calc(100vw - 120px) !important;
    }
    .last-col {
        width: calc(100vw - 120px) !important;
    }

    .second-last-col {
        width: calc(100vw - 120px) !important;
    }
    
    #search-table .table thead {
        display: none;
    }
    .table-caption {
        display: block;
        font-size: 13px;
        color: var(--color-primary);
        margin-bottom: 5px;
        font-weight: 800;
    }
    .mobile-show {
        display: inline-block;
    }
}



@media (max-width: 768px) {
    
    .table td.full-col,
    .table th.full-col {
        display: inline-block;
        width: 50%;
        font-size: 16px;
    }

    .first-col {
        width: calc(100vw - 60px) !important;
    }
    .last-col {
        width: calc(100vw - 60px) !important;
    }
    .second-last-col {
        width: calc(100vw - 60px) !important;
    }
}

@media (max-width: 375px) {

    .table td.full-col,
    .table th.full-col {
        display: block;
        width: calc(100vw - 60px) !important;
        font-size: 16px;
    }

    .first-col {
        width: calc(100vw - 60px) !important;
    }
    .last-col {
        width: calc(100vw - 60px) !important;
    }
}

/* Sort indicators on table headers */
th[data-sort] {
    cursor: pointer;
    user-select: none;
}

th[data-sort]:hover {
    background-color: rgba(0,0,0,0.05);
}

th[data-sort]::after {
    content: '';
    margin-left: 5px;
    opacity: 0.3;
}

th.sort-asc::after {
    content: '▲';
    opacity: 1;
}

th.sort-desc::after {
    content: '▼';
    opacity: 1;
}

.indicator-compare {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-left: 5px;
    border-radius: 50%;
    background-color: orange;
}

.indicator-herd {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-left: 5px;
    border-radius: 50%;
    background-color: green;
}

.table-striped>tbody>tr:nth-of-type(odd)>* {
    background: var(--color-blue-tint);
    --bs-table-accent-bg: transparent;
    --bs-table-striped-bg: transparent;
}

.compare-indicator {
    background-color: #6da32f;
    border: 1px solid #6da32f;
    padding: 4px;
    transition: 0.3s all;
    height: 25px;
    width: 25px;
    border-radius: 25px;
    display: inline-block;
    
}

/* --------------------------------------------------------------------------
   3. Animal details
   -------------------------------------------------------------------------- */

h1.animal-name {
    font-weight: 900;
    color: var(--color-primary);
}

.animal-label {
    font-weight: 600;
    display: block;
}

.animal-details {
    border-radius: 10px;
    border: 1px solid #0085CA;
    background: var(--color-blue-tint);
    width: 100%;
    display: block;
    padding: 10px 20px;
    font-size: 24px;
    
}

.chart-controls {
    border-bottom: 1px solid var(--color-primary);
}

.analysis-date {
    padding: var(--btn-padding-y) var(--btn-padding-x);
    background: #E8E7E7;
    border-radius: var(--btn-border-radius);
}

.nav-tabs {
    --bs-nav-tabs-border-color: var(--color-primary);
}

.nav-tabs .nav-link {
    padding: 15px;
    padding-left:20px !important;
    padding-right:20px !important;
    font-weight: 600;
    background: #E8E7E7;
    border-bottom: 1px solid var(--color-primary);
    
}

.nav-tabs .nav-link:focus, .nav-tabs .nav-link:hover {
    border-bottom: 1px solid var(--color-primary);
    color: var(--color-text-white);
    background: var(--color-primary-hover);
}

.nav-tabs .nav-link:focus-visible {
    color: #ffffff;
    background-color: var(--color-primary-hover) !important;
    border-color: var(--color-primary-hover) !important;
    outline: 3px solid var(--color-focus) !important;
    box-shadow: 0 0 0 0;
}

.nav-tabs .nav-item.show .nav-link, .nav-tabs .nav-link.active {
    color: #ffffff;
    background-color: var(--color-accessible);
    border-color: var(--color-accessible);
    padding: 15px;
    padding-left:20px !important;
    padding-right:20px !important;
    font-weight: 600;
    
}

.card-header {
    padding: 20px 20px;
    margin-bottom: 0;
    color: var(--bs-card-cap-color);
    background-color: var(--color-blue-tint);
    border-bottom: var(--bs-card-border-width) solid var(--color-primary);
}

.display-5 {
    font-weight: 300;
}

.border-bottom {
    border-bottom: var(--bs-border-width) var(--bs-border-style) var(--color-primary) !important;
}

.border-end {
    border-right: var(--bs-border-width) var(--bs-border-style) var(--color-primary) !important;
}

.card {
    border: var(--bs-card-border-width) solid var(--color-primary) ;
}

@media print {
    body * {
        visibility: hidden;
    }
    .animal-print-area,
    .animal-print-area * {
        visibility: visible;
    }
    .animal-print-area {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }

    /* Show both tab panes when printing */
    .animal-print-area .tab-pane {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        width: 100% !important;
    }

    /* Hide the tab buttons */
    .animal-print-area .nav-tabs {
        display: none !important;
    }

    /* Full width charts */
    .animal-print-area canvas {
        width: 100% !important;
        page-break-inside: avoid;
    }
}

.btn-animal-page {
    background-color: #ffffff;
    border: 1px solid var(--color-primary);
    padding: 10px !important;
    transition: 0.3s all;
    width: 60px;
    height: 80px;
    color: var(--color-primary-hover);
}

.btn-animal-page:hover {
    background-color: var(--color-accessible-hover);
    border: 1px solid var(--color-accessible-hover);
    padding: 10px !important;
    transition: 0.3s all;
    width: 60px;
    height: 80px;
    color: #fff;
}

.btn-animal-page:focus {
    background-color: var(--color-accessible-hover);
    border: 1px solid var(--color-accessible-hover);
    padding: 10px !important;
    transition: 0.3s all;
    width: 60px;
    height: 80px;
    color: #fff;
}

.btn-animal-page:focus-visible {
    background-color: var(--color-accessible-hover);
    border: 1px solid var(--color-accessible-hover);
    padding: 10px !important;
    transition: 0.3s all;
    width: 60px;
    height: 80px;
    color: #fff;
}

.btn-animal-page:hover img, .btn-animal-page:focus img, .btn-animal-page:focus-visible img {
    filter: brightness(0) invert(1);
}

@media (max-width: 1199px) {
    .btn-animal-page {
        width: 60px;
        height: 60px;
    }
}

a.animal-link {
    display: block;
    height: 100%;
    border-radius: 8px;
}

a.animal-link:focus {
    outline: 0 solid var(--color-focus) !important;
    border: 1px solid var(--primary-content-color);
    padding: 0;
}

a.animal-link:focus-visible {
    outline: 3px solid var(--color-focus) !important;
    border: 1px solid var(--primary-content-color);
    padding: 0;
}

.no-data {
    display: flex;
    align-items: center;
    gap: 8px;
    pointer-events: auto;
    background: transparent;
    color: rgba(0, 0, 0, .5);
}

.no-data-circle {
    width: 25px;
    height: 25px;
    color: #333;
    border: 1px solid #333333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    border-radius: 50%;
    margin-left: 0;
    margin-top: 5px;
    margin-bottom: 5px;
}

/* Tooltip link styling */
.tooltip a,
.tooltip-link {
    color: #fff;
    text-decoration: underline;
}

.tooltip a:hover,
.tooltip-link:hover {
    color: #fff;
}

[data-bs-toggle="tooltip"][data-bs-trigger="click"] {
    cursor: pointer;
}

/* --------------------------------------------------------------------------
   4. Dashboard
   -------------------------------------------------------------------------- */

.question-circle {
    width: 25px;
    height: 25px;
    color: #333;
    border: 1px solid #333333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    border-radius: 50%;
    margin-left: 10px;
}

.animal-gender {
    width: 30px;
    height: 30px;
    color: var(--primary-content-color);
    border: 1px solid var(--primary-content-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    border-radius: 50%;
    margin-left: 10px;
    font-size: 18px;
}

.animal-score-card {
    border: 1px solid #D2D2D2;
    box-shadow: 0 3px 4px 0 rgba(0, 0, 0, 0.10);
}

/* --------------------------------------------------------------------------
   5. Static Pages
   -------------------------------------------------------------------------- */

.classification-selector__btn {
    flex: 1 1 0;
    min-width: 60px;
    padding: 10px 8px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.classification-selector__btn:hover {
    border-color: #0090d4;
    color: #0090d4;
}

/* ------------------------------------------------------------------
   6 News section
------------------------------------------------------------------ */
.news-heading {
    color: var(--primary-content-color);
    font-weight: 700;
    font-size: 1.125rem;
    letter-spacing: .01em;
}

/* Grid ------------------------------------------------------------- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 380px;  /* fixed row height */
    gap: 1.5rem;
}

.news-card {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 10px;
    text-decoration: none;
    color: #fff;
    background: #111;
    /* aspect-ratio removed — height comes from the grid row */
    transition: transform .25s ease, box-shadow .25s ease;
}

.news-card:hover,
.news-card:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
}

.news-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Position variants – grid placement only, aspect ratio is uniform */
.news-card--hero       { grid-column: 1 / span 2; grid-row: 1; }
.news-card--feature    { grid-column: 3;          grid-row: 1; }
.news-card--tall       { grid-column: 3;          grid-row: 2; }

/* Overlay ---------------------------------------------------------- */
.news-card__overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1rem 1.25rem 1.5rem;
    background: rgba(20, 20, 20, .72);
    backdrop-filter: blur(2px);
    border-radius: 0;
}

.news-card__title {
    margin: 0 0 .75rem;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
}

.news-card--hero .news-card__title { font-size: 1.375rem; }

@media (max-width: 768px) {
    .news-card--hero .news-card__title { font-size: 1.2rem; }
    .news-card__title {
        margin: 0 0 .75rem;
        font-size: 1rem;
        font-weight: 700;
        line-height: 1.3;
        color: #fff;
    }
}


.news-card__meta {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .3rem .7rem;
    background: #fff;
    color: #111;
    border-radius: 5px;
    font-size: .8125rem;
}

.news-card__meta-divider { color: #e2e2e2; }

/* Sidebar ---------------------------------------------------------- */
.news-side-list__item {
    padding: 0 0 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #e2e2e2;
}

.news-side-list__item:last-child {
    margin-bottom: 0;
}

.news-side-list__link {
    color: #111;
    text-decoration: none;
    font-weight: 500;
    line-height: 1.4;
    display: block;
}

.news-side-list__link:hover { color: #0098d4; }

.news-side-cta {
    background: #0098d4;
    border-color: #0098d4;
    padding: .75rem 1.5rem;
    font-weight: 600;
    border-radius: 6px;
}

.news-side-cta:hover,
.news-side-cta:focus {
    background: #007aad;
    border-color: #007aad;
}

/* Responsive ------------------------------------------------------- */
@media (max-width: 1239.98px) {
    .news-grid           { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 420px; }
    .news-card--hero     { grid-column: 1 / span 2; grid-row: auto; }
    .news-card--feature,
    .news-card--tall     { grid-column: auto; grid-row: auto; }
}

@media (max-width: 575.98px) {
    .news-grid           { grid-template-columns: 1fr; grid-auto-rows: 320px; }
    .news-card,
    .news-card--hero,
    .news-card--feature,
    .news-card--tall     { grid-column: 1; }
}

.breadcrumb-area {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.article-content {
    text-align: left;
}

@media (max-width: 926px) {
    .breadcrumb-area {
        display: block;
        text-align: center;
    }
    .article-content {
        text-align: center;
    }
}

/* ------------------------------------------------------------------
   7 Tables
------------------------------------------------------------------ */

.table-content {
    font-size: 15px;
    line-height: 1.2;
    background: transparent;
    border-color: var(--color-primary);
    border-radius: 0px;
    width: 100% !important;
}

.rte-content table,
.umb-rte table {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: auto; 
}

.rte-content table td,
.rte-content table th {
    min-width: 0 !important;
    width: auto !important;
}

.rte-content table colgroup {
    display: none; 
}

.table-100 {
    width: 100% !important;
    table-layout: fixed;
}

.breed-ranking-section .table-responsive {
    width: 100%;
}

.breed-ranking-section .table {
    width: 100% !important;
    min-width: 100%;
}

.table-scroll-wrapper {
    overflow-x: auto;
    margin-bottom: 1rem;
}

.table-scroll-wrapper table {
    width: auto !important;
    min-width: 800px !important;
}

.table-scroll-hint {
    color: #666;
    margin-bottom: 0;
}

.table-checkbox {
    display:flex;
    gap: 5px;
}

.table-sort {
    color: inherit;
    text-decoration: underline;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.table-sort:hover {
    color: var(--color-primary);
}

.table-sort.active {
    color: var(--primary-content-color);
    font-weight: bold;
}

.sort-icon {
    font-size: 0.75em;
}

/* Hide scrollbar arrows in Edge/Chrome */
.table-scroll-wrapper::-webkit-scrollbar {
    height: 8px;
}

.table-scroll-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.table-scroll-wrapper::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.table-scroll-wrapper::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Hide scrollbar buttons/arrows */
.table-scroll-wrapper::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
}

/* ------------------------------------------------------------------
   8 Graphs
------------------------------------------------------------------ */

.graph-data {
    display: flex;
    align-items: center;
    gap: 8px;
    pointer-events: auto;
    background: rgba(255, 255, 255, .7);
    border: 1px solid rgba(0, 0, 0, .4);
    padding: 5px 8px;
    border-radius: 4px;
}

.graph-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: var(--color-primary);
    color: var(--color-text-white);
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    text-decoration: none;
    pointer-events: auto;
}

.graph-info:hover {
    background: var(--color-primary-hover);
    color: var(--color-text-white);
}

.graph-row {
    display: none;
}

.graph-figure {
    color: #000000;
    font-size: 13px;
    font-weight: bold;
}

.graph-nodata {
    color: #666666;
    font-size: 13px;
}

/* Show at mobile */
@media (max-width: 768px) {
    .graph-row {
        display: inline-block;
        font-size: 11px;
    }
    .graph-data {
        display: flex;
        align-items: center;
        gap: 8px;
        pointer-events: auto;
        background: rgba(255, 255, 255, .8);
        border: 1px solid rgba(0, 0, 0, .4);
        padding: 5px 8px;
        border-radius: 4px;
    }
    .graph-figure {
        color: #000000;
        font-size: 11px;
        font-weight: bold;
    }

    .graph-nodata {
        color: #666666;
        font-size: 11px;
    }
}

/* Default state - show "Compare", hide "Compared" */
.compare-btn .compare-icon-selected {
    display: none;
}

/* Selected state - show "Compared", hide "Compare" */
.compare-btn[data-selected="true"] .compare-icon-default {
    display: none;
}

.compare-btn[data-selected="true"] .compare-icon-selected {
    display: inline;
}

.compare-btn[data-selected="true"] {
    background-color: #025328;
    border-color: #025328;
    color: #fff;
}
.compare-btn[data-selected="true"]:focus-visible {
    color: var(--color-primary-hover);
}

.compare-btn[data-selected="true"]:hover {
    background-color: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
    color: #fff;
}

/* ------------------------------------------------------------------
   9 FAQs
------------------------------------------------------------------ */

.accordion-button:not(.collapsed) {
    color: var(--bs-accordion-active-color);
    background-color: var(--color-blue-tint-dark);
    box-shadow: inset 0 calc(-1 * var(--bs-accordion-border-width)) 0 var(--bs-accordion-border-color);
}

.accordion-button {
    padding: 20px 30px;
}

.accordion-button:focus {
    color: var(--bs-accordion-active-color);
    background-color: var(--color-blue-tint-dark);
    box-shadow: inset 0 calc(-1 * var(--bs-accordion-border-width)) 0 var(--bs-accordion-border-color);
}

.accordion-body {
    padding: 15px 15px;
}