/* 
    Created on : 25 Jun 2024, 14.21.00
    Author     : pekka
*/

.smartdog-container {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    width: 100%;
    overflow: auto;
}

.smartdog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #363b3f;
    border-bottom: 1px solid #bbb;
}

.smartdog-nav-buttons {
    display: flex;
    align-items: center;
}

.smartdog-nav-buttons button {
    margin-right: 10px;
    padding: 5px 10px;
    cursor: pointer;
    background: none;
    border: none;
    font-size: 1.2em;
}

.nav-button-spacer {
    border-left: thin solid #eeefef;
    margin-left: 10px;
    padding-left: 10px;
    min-width: 20px;
    height: 20px;
    margin-right: 0px;
    padding-right: 10px;
    color: #fe9905;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.smartdog-auth-controls {
    display: flex;
    align-items: center;
    gap: 10px; 
    color: white;
}

.smartdog-nav-button {
    padding: 5px 10px;
    background: black;
    border: black;
    color: white;
    cursor: pointer;
}

.smartdog-nav-button.selected {
    margin-right: 10px;
    padding: 5px 10px;
    background: #fe9905 !important;
    border: #fe9905;
    color: white !important;
    cursor: pointer;
}

.smartdog-nav-button:disabled {
    margin-right: 10px;
    padding: 5px 10px;
    background: #666;
    border: #999;
    color: #999;
    cursor: none;
}

.smartdog-nav-button.selected:disabled {
    background: #fe9905 !important;
    color: white !important;
}
.smartdog-nav-button:hover {
    border:none;
}

.smartdog-auth-button {
    padding: 5px 10px !important; 
    background: inherit;
    border: inherit; 
    cursor: pointer;
}

.smartdog-content {
    flex-grow: 1;
    padding: 0px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 200px;
    margin-bottom: 20px;
}

.login-prompt {
    display: block;
    justify-content: center;
    align-items: center;
    font-size: 1em;
    margin-top: 60px;
}

.login-prompt h3 {
    font-size: 1.2em;
}

.breco-teaser {
    display: block;
    justify-content: center;
    align-items: center;
    font-size: 1em;
    margin-top: 60px;
    margin-left: 60px;
    margin-right: 60px;
}

.breco-teaser h3 {
    font-size: 1.2em;
}

.report-header, .breco-header, .test-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 10px;
    background-color: #ededed;
    border-bottom: 2px solid #fcfcfc;
}

.test-header {
    padding-left:60px;
    margin-left: 60px;
    margin-right: 60px;
    background-color: #fff;
    border-bottom: 2px solid #f2f2f2;
}

#comparison-test-header {
    padding-left: 0;
    margin-left: 0;
    margin-right: 0;
    padding-top: 10px;
    padding-bottom: 10px;
}

.breco-chart-wrapper {
    display: flex;
    justify-content: center;  /* Centers each chart horizontally */
    align-items: center;
    width: 100%;
    height: 600px;
    margin-bottom: 20px; /* Add some space between charts */
}

.breco-chart-wrapper canvas {
    max-width: 100%;  /* Adjust the maximum width to control the chart size */
    max-height: 600px;  /* Adjust the maximum height to control the chart size */
}

#report-selector {
    border-bottom: thin solid darkgray;
    margin-bottom: 10px;
    padding-bottom: 20px;
}

#pets-selector-wrapper, #template-selector-wrapper {
    width: 230px;
}

#breco-agegroup-selector-wrapper {
    width:230px;
}

#comparison-agegroup-selector-wrapper {
    width:230px;
}

#breco-agegroup-selector {
    display: flex;
    flex-direction: column;
    gap: 10px; /* Optional: adds space between the items */
    align-items: flex-start; /* Ensures label and select box are aligned to the left */    
    width: 230px;
}

#breed-selector-wait-indicator {
    width: 100%;
    height: 40px;
    position: relative;
}

#breed-selector-wait-indicator:empty {
    display: none;
}

.header-details {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    padding-left: 40px;
    justify-content: flex-start;
    align-items: flex-start;
}

#comparison-test-details-header .detail {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-right: 0;
    padding-right: 15px;
}

#comparison-test-details-header .detail:nth-child(1) {
    width: 200px; /* More space for official name */
    min-width: 200px;
    max-width: 200px;
}

#comparison-test-details-header .detail:nth-child(2) {
    width: 120px; /* Date of birth */
    min-width: 120px;
    max-width: 120px;
}

#comparison-test-details-header .detail:nth-child(3) {
    width: 180px; /* Breed */
    min-width: 180px;
    max-width: 180px;
}

#comparison-test-details-header .detail:nth-child(4) {
    width: 100px; /* Gender */
    min-width: 100px;
    max-width: 100px;
}

.detail {
    display: flex;
    flex-direction: column; /* Ensures labels and values are stacked */
    align-items: flex-start; /* Aligns text to the left */
    min-width: 100px; /* Adjust width if needed */
    margin-right: 10px;
}

.pet-visibility-rb {
    margin-right: 20px;
}

#pet-visibility-wrapper {
    display: none;
}

.detail-title {
    font-weight: bold;
    font-size: 0.8em;
    color: #7e8082;
    margin-bottom: 4px;
    line-height: 1; /* Adjust line height to reduce vertical spacing */
}

.detail-value {
    font-size: 0.9em;
    margin-top: 0; /* Ensure there's no extra margin at the top */
    margin-bottom: 10px; /* Adjust this value to control the gap between pairs of titles and values */
    line-height: 1; /* Adjust line height to reduce vertical spacing */
}

.detail-title,
.detail-value {
    text-align: left;
}

#comparison-test-details-row {
    display: flex;
    flex-direction: column;
}

.detail-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    padding-left: 40px;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 2px;
    padding-top: 2px;
    padding-bottom: 2px;
}

.detail-row .detail {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-right: 0;
    padding-right: 15px;
}

.detail-row .detail:nth-child(1) {
    width: 200px; /* More space for official name */
    min-width: 200px;
    max-width: 200px;
}

.detail-row .detail:nth-child(2) {
    width: 120px; /* Date of birth */
    min-width: 120px;
    max-width: 120px;
}

.detail-row .detail:nth-child(3) {
    width: 180px; /* Breed */
    min-width: 180px;
    max-width: 180px;
}

.detail-row .detail:nth-child(4) {
    width: 100px; /* Gender */
    min-width: 100px;
    max-width: 100px;
}

.detail-row .detail span {
    font-size: 0.75em;
    line-height: 1.2;
}

.detail-row .detail .detail-value {
    margin-bottom: 0;
}

.smartdoc-auth-control {
    margin-left: auto;    
}

.smartdog-service-view {
    width: 100%;
}

.left-bar-selector {
    width: 230px;
}

#filter-group {
    display: flex;
    flex-direction: row; /* Arrange radio buttons horizontally */
    gap: 10px; /* Add spacing between radio buttons */
    margin-top: 8px; /* Add spacing between label and radio buttons */
    margin-bottom: 8px; /* Add spacing between radio buttons and select */
}

#filter-group label {
    display: flex;
    align-items: center; /* Align text and radio buttons vertically */
    font-size: 14px; /* Optional: Adjust font size */
    cursor: pointer; /* Add a pointer cursor for labels */
}

#filter-group input[type="radio"] {
    margin-right: 5px; /* Add space between the radio button and its label text */
}

.report-container, .breco-container {
    display: flex;
    overflow: auto;
}

.report-sidebar, .breco-sidebar {
    width: 250px;
    background-color: #ededed;
    border-right: 2px solid #f5f5f5;
    padding: 10px;
}

#test-selector {
    margin-bottom: 20px;
}

.chart-list-wrapper {
    padding: 0;
    border: none;
}

.report-sidebar ul, .breco-sidebar ul {
    list-style-type: none;
    padding: 0;
}

.report-sidebar ul li, .breco-sidebar ul li {
    padding: 10px;
    cursor: pointer;
    list-style-type: none;
}

.report-sidebar ul li:hover, .breco-sidebar ul li:hover {
    background-color: #ddd;
}

.report-sidebar ul li.selected, .breco-sidebar ul li.selected {
    background-color: #d3d3d3;
}

.report-content , .breco-content {
    flex-grow: 1;
    min-height: calc(500px);
    padding: 0px;
    overflow-y: auto;
    height: auto;
}

.authorization-link {
    color: var(--e-global-color-f1d60cf) !important;
}

.authorization-link:hover {
    color: var(--e-global-color-accent) !important;
}

.smartdog-chart-container {
    display: flex;
    flex-direction: column;
    justify-content: center;  /* Centers content vertically */
    align-items: center;      /* Centers content horizontally */
    width: 100%;
    height: auto;
    padding-top: 20px; /* Add padding for space around the charts */
    box-sizing: border-box;
    position: relative;
}

.smartdog-chart-wrapper, .comparison-chart-wrapper {
    display: flex;
    justify-content: center;  /* Centers each chart horizontally */
    align-items: center;
    width: 100%;
    height: 600px;
    margin-bottom: 20px; /* Add some space between charts */
}

.smartdog-chart-wrapper canvas {
    max-width: 90%;  /* Adjust the maximum width to control the chart size */
    max-height: 600px;  /* Adjust the maximum height to control the chart size */
}

.comparison-chart-wrapper canvas {
    max-width: 90%;  /* Adjust the maximum width to control the chart size */
    max-height: 600px;  /* Adjust the maximum height to control the chart size */
}

.chart-list {
    margin-top: 20px;
    position: relative;
}

.chart-list:empty {
    border-top:none
}

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

.spinner {
    margin-top: 5px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: #09f;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    display: block;
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.chart-header-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
    margin-bottom: 20px;
    position: relative;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-left: 20px;
    padding-right: 20px;
}
.chart-header {
    font-size: 24px;
    hyphens: auto;
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
    -ms-hyphens: auto;
    word-break: break-word;
    overflow-wrap: break-word;
    flex: 1;
    min-width: 0;
    text-align: center;
    line-height: 1.4;
}

.tooltip {
    font-size: 24px;
    cursor: pointer;
    margin-left: 10px;
    position: relative;
}

.chart-info {
    font-size: 16px;
    color: #555;
    text-align: left;
    margin-left: 20px;
    margin-right: 20px;
    margin-bottom: 10px;
}

#pdf-download-div {
    visibility: hidden;
    border-top: thin solid darkgray;
    padding-top: 40px;
    padding-bottom: 20px;
}

.alert-div {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f9f9f9;
    border: 1px solid #f3f3f3;
    width: 100%;
    height: auto; /* Allows height to adjust based on content */
    padding: 0;
    box-sizing: border-box; /* Ensures padding doesn't affect width */
    min-height: 50px; /* Optional: to ensure a minimum height even when empty */
    position: relative;
}

.alert-div:not(:empty) {
    margin: 20px 20px 20px 20px;
}

.alert-div:empty {
    display:none;
    margin: 0 0 0 0;
}

#breco-breed-selector {
    display: flex;
    flex-direction: column; /* Stack label and select vertically */
    gap: 5px; /* Optional: Add spacing between label and select */
    margin: 10px 0; /* Optional: Add margin around the container */
}

/* Container styles */
/* Section wrapper styles - treated as rows */
.breco-top5-section-wrapper {
    display: block; /* Ensure proper block layout */
    margin-bottom: 20px; /* Add space below each section */
    padding: 10px; /* Optional: Add padding for better structure */
}

#breco-top5-container {
    display: block; /* Use flex layout for alignment */
    flex-direction: column; /* Ensure items are stacked vertically */
    max-width: 800px; /* Set the maximum width */
    width: 100%; /* Allow it to shrink on smaller screens */
    margin-left: auto; /* Center horizontally */
    margin-right: auto; /* Center horizontally */
    gap: 20px; /* Add consistent gap between sections (alternative to margin-bottom) */
}

/* Section wrapper styling */
.breco-top5-section-wrapper {
    margin-bottom: 20px;
}

/* Header styling */
.breco-top5-section-header {
    font-weight: bold;
    font-size: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #fb9a08;
    border: 1px solid #ccc;
    color: #363b3f;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Description styling */
.breco-top5-section-description {
    display: none; /* Initially hidden */
    margin-top: 10px;
    padding: 10px;
    color: #555;
    font-size: 14px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 5px;
}

/* Visible description */
.breco-top5-section-description.visible {
    display: block; /* Show when 'visible' class is added */
}

/* Breed list wrapper - below header */
.breco-top5-breedlist-wrapper {
    display: flex; /* Arrange result boxes in a row */
    flex-direction: column; /* Display result header row on top */
    gap: 10px; /* Space between result header and result boxes */
    padding: 15px;
    margin-left: 20px; /* Indent breed list */
    border: 1px solid #ccc;
    border-top: none; /* Seamless with header */
    background-color: #fff;
    border-radius: 0 0 5px 5px; /* Rounded corners on bottom */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Result header row inside the breedlist wrapper */
.breco-top5-result-header-row {
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    color: #555;
    margin-bottom: 8px;
    word-wrap: break-word; /* Ensures long words break */
    overflow-wrap: break-word; /* Compatibility for newer browsers */
    white-space: normal; /* Allows text wrapping */
    padding: 5px;
}
/* Individual result boxes (columns) */
.breco-top5-result-box-wrapper {
    display: flex;
    flex-wrap: wrap; /* Allow boxes to wrap to the next line if needed */
    gap: 15px; /* Space between result boxes */
    justify-content: space-between; /* Evenly distribute boxes */
}

.breco-top5-result-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    width: 120px; /* Fixed width for each box */
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #fafafa;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    white-space: normal; /* allow wrapping */
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.breco-top5-result-box:hover {
    transform: translateY(-5px); /* Lift effect on hover */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Result inside result box */
.breco-top5-result-row {
    font-size: 14px;
    text-align: center;
    color: #333;
    font-weight: bold;
    margin-top: 5px; /* Add spacing from the content above */
}

/* General Typography */
body {
    font-family: Arial, sans-serif;
    color: #444;
    line-height: 1.5;
}

.select2-container {
    max-width: 230px;
    width: 100% !important;
}

/* Ensure Select2 container has a proper height */
.select2-container .select2-selection--single {
  height: 38px !important; /* Adjust to match other form inputs */
  display: flex !important;
  align-items: center !important;
  border: 1px solid #ccc; /* Ensure proper styling */
  border-radius: 4px; /* Optional: adds rounded corners */
}

/* Adjust the text inside the selection box */
.select2-selection--single .select2-selection__rendered {
  line-height: normal !important;
  font-size: 16px; /* Adjust for better readability */
  padding-left: 10px !important;
  padding-right: 35px !important; /* Prevent overlap with the clear button */
  text-align: left !important;
  display: flex !important;
  align-items: center !important;
  height: 100% !important;
}

/* Ensure the clear button is on the right and centered */
.select2-selection__clear {
  position: absolute !important;
  right: 30px !important;
  top: 50% !important;
  transform: translateY(-50%);
  z-index: 10;
}

/* Adjust dropdown items height */
.select2-results__option {
  padding: 8px 12px !important;
  font-size: 16px;
}

/* Ensure search field is visible in Select2 dropdown for multiple select */
.select2-dropdown .select2-search {
  display: block !important;
}

.select2-dropdown .select2-search__field {
  width: 100% !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}


/* --------------------------- */

.report-list {
  display: flex;
  flex-direction: column;
  width: 100%;
/*  font-family: sans-serif;*/
  overflow: hidden;
}

.comparison-test-header {
    margin-left: 10px;
    margin-right: 10px;
    padding-left: 0px;
    padding-right: 0px;
    background-color: #fff; 
}

.comparison-report-header {
    background-color: #fff;
    border-bottom: 1px solid #f2f2f2;  
    padding-bottom: 0px;
}

.report-row {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  padding: 8px 12px;
  align-items: center;
}

.report-row:nth-child(even) {
  background-color: #fafafa;
}

.report-row:nth-child(odd) {
  background-color: #ffffff;
}

.report-row div,
.report-header div {
  padding: 4px;
  word-break: break-word;
}

.remove-btn {
  background-color: #e53935;
  color: white;
  border: none;
  padding: 4px 8px;
  cursor: pointer;
  border-radius: 3px;
}

.remove-btn:hover {
  background-color: #c62828;
}