
/* CSS variables used in this component. */
#taxon_history_container {
   --ictv-abolished-color: #cf2222;
   --ictv-alt-row-bg: #efefef;
   --ictv-border-color: #aaa;
   --ictv-border-focus-color: #80bdff;
   --ictv-button-bg: #ddd;
   --ictv-button-border-color: #aaa;
   --ictv-danger-color: #dc3545;
   --ictv-dark-grey-color: #555;
   --ictv-disabled-color: #999;
   --ictv-highlight-color: #fff6c4;
   --ictv-highlight-color-darker: #ffe770;
   --ictv-icon-color: #888;
   --ictv-lightest-grey-color: #bbb;
   --ictv-light-grey-color: #888;
   --ictv-link-color: #0066cc;
   --ictv-link-hover-color: #004999;
   --ictv-modal-header-bg: rgb(0, 104, 240);
   --ictv-panel-header-color: #4aa3df;
   --ictv-primary-color: #007bff;
   --ictv-secondary-color: #6c757d;
   --ictv-success-color: #198754;
   --ictv-warning-color: #ffc107;
}

/*-------------------------------------------------------------------------------------------------------------------------------------------------
   Taxon release history
-------------------------------------------------------------------------------------------------------------------------------------------------*/

/* The message panel */
#taxon_history_container .message-panel.visible {
   margin-top: 2.0rem;
   width: 100%;
}


/* The selected taxon */
#taxon_history_container .selected-taxon {
   font-size: 1.3rem;
   margin-bottom: 1.0rem;
}
#taxon_history_container .selected-taxon .taxon-rank {
   margin-left: 0.25rem;
   text-transform: capitalize;
}
#taxon_history_container .selected-taxon .taxon-name {
   font-style: italic;
   margin: 0 0.25rem;
}

/* The instructions */
#taxon_history_container .instructions {
   display: none;
}
#taxon_history_container .instructions.visible {
   display: block;
   font-size: 1.0rem;
   margin-bottom: 1.0rem;
}
#taxon_history_container .instructions .selected-name {
   font-style: italic;
}
#taxon_history_container .instructions .highlighted {
   background-color: var(--ictv-highlight-color);
}

/* The title above a taxon */
#taxon_history_container .taxon-title {
   font-size: 1.2rem;
}

#taxon_history_container .taxon {
   visibility: hidden;
}

#taxon_history_container .taxon.visible {
   display: flex;
   flex-flow: column nowrap;
   font-size: 1.0rem;
   margin-bottom: 0.5rem;
}

#taxon_history_container .taxon .taxon-rank {
   text-transform: capitalize;
}

#taxon_history_container .taxon .taxon-name {
   font-style: italic;
   font-weight: 700;
   margin-left: 0.25rem;
}

#taxon_history_container .taxon .taxon-release {
   margin-left: 0.25rem;
}

#taxon_history_container .taxon .info-row {
   align-items: center;
   display: flex;
   flex-flow: row nowrap;
   font-size: 1.3rem;
   justify-content: flex-start;
}
/*
#taxon_history_container .lineage {
   color: #777;
   font-size: 11pt;
   font-weight: normal;
   margin: 5px 0 0 0;
}*/

#taxon_history_container .lineage .lineage-chevron {
   color: var(--ictv-disabled-color);
   font-size: 1.0rem;
   font-weight: normal;
   margin: 0 0.25rem;
}

/* A vertically-oriented taxon row 
#taxon_history_container .lineage-row {
   display: flex;
   flex-flow: row nowrap;
   margin-bottom: 0.1rem;
}

#taxon_history_container .lineage-row .rank-name {
   font-weight: 700;
   text-transform: capitalize;
}

#taxon_history_container .lineage-row .taxon-name {
   margin-left: 0.2rem;
}*/



/* Panels for the MSL releases */
#taxon_history_container .releases {
   display: block;
}

#taxon_history_container .release {
   background-color: #efefef;
   border-radius: 10px;
   border-color: #ddd;
   border-style: solid;
   border-width: 0.5px;
   margin-bottom: 30px;
}

#taxon_history_container .release .release-header {
   align-items: center;
   background-color: var(--ictv-panel-header-color);
   border-radius: 10px 10px 0 0;
   color: #fff;
   display: flex;
   flex-flow: row nowrap;
   justify-content: flex-start;
   padding: 0.25rem 0 0 1.2rem;
}

#taxon_history_container .release .release-header .release-year {
   font-size: 30pt;
   margin-right: 1.0rem;
}

#taxon_history_container .release .release-header .release-title {
   font-size: 12pt;
}

#taxon_history_container .release .release-header .is-current {
   color: var(--ictv-highlight-color-darker);
   display: block;
   flex-grow: 1;
   margin-right: 2.0rem;
   margin-left: auto;    
   text-align: right;
}
#taxon_history_container .release .release-header .is-current:empty {
   display: none;
   width: 0;
}

#taxon_history_container .release .release-body {
   border-color: #ddd;
   border-radius: 0 0 10px 10px;
   border-style: solid;
   border-width: 0 1px 1px 1px;
}

#taxon_history_container .release .release-body hr {
   background-color: #fff;
   border-color: #555; 
   margin: 0;
}
#taxon_history_container .release .release-body .changed-taxon {
   padding: 1.0rem;
}
#taxon_history_container .release .release-body .changed-taxon.highlighted {
   background-color: var(--ictv-highlight-color);
}

/* The taxon rank and name are displayed in red for abolished taxa. */
#taxon_history_container .release .release-body .changed-taxon.abolished .taxon-rank-and-name {
   color: var(--ictv-abolished-color);
}

#taxon_history_container .release .taxon-rank-and-name {
   align-items: flex-start;
   display: flex;
   flex-flow: row nowrap;
   font-size: 1.3rem;
   justify-content: flex-start;
}
#taxon_history_container .release .taxon-rank-and-name .rank-name {
   margin-right: 0.25rem;
}
#taxon_history_container .release .taxon-rank-and-name .taxon-name {
   font-style: italic;
   font-weight: 700;
   white-space: nowrap;
   
}
#taxon_history_container .release .taxon-rank-and-name .taxon-changes {
   margin-left: 0.25rem;
}

#taxon_history_container .release .taxon-rank-and-name .subtle-rank-name {
   font-weight: normal;
} 
#taxon_history_container .release .taxon-rank-and-name .subtle-taxon-name {
   font-style: italic;
}


/* New, Abolished, Promoted, Demoted, Moved, Lineage updated, Merged, Split, Renamed, and Unchanged */
#taxon_history_container .release .taxon-rank-and-name .change {
   border-bottom: 1px dashed black;
   cursor: pointer;
   display: inline-block;
}
#taxon_history_container .release .taxon-rank-and-name .new,
#taxon_history_container .release .taxon-rank-and-name .split,
#taxon_history_container .release .taxon-rank-and-name .renamed  {
   font-weight: normal;
}
#taxon_history_container .release .taxon-rank-and-name .promoted,
#taxon_history_container .release .taxon-rank-and-name .moved,
#taxon_history_container .release .taxon-rank-and-name .lineage-updated,
#taxon_history_container .release .taxon-rank-and-name .merged {
   font-weight: normal;
}
#taxon_history_container .release .taxon-rank-and-name .unchanged {
   font-weight: normal;
}
#taxon_history_container .release .taxon-rank-and-name .demoted {
   font-weight: normal;
}
#taxon_history_container .release .taxon-rank-and-name .abolished {
   font-weight: normal;
}

#taxon_history_container .release .taxon-lineage-row {
   align-items: flex-start;
   display: flex;
   flex-flow: row nowrap;
   justify-content: flex-start;
   margin-top: 0.5rem;
}

/* The taxon lineage for a taxon in a release */
#taxon_history_container .release .taxon-lineage-row .label {
   font-size: 1.0rem;
   margin-right: 0.25rem;
}
#taxon_history_container .release .taxon-lineage-row .lineage {
   font-size: 1.0rem;
}
#taxon_history_container .release .taxon-lineage-row .lineage .lineage-chevron {
   color: var(--ictv-border-color);
   font-size: 1.0rem;
   font-weight: normal;
   margin: 0 0.25rem;
}



/*-------------------------------------------------------------------------------------------------------------------------------------------------
   Export controls for the taxon lineage
-------------------------------------------------------------------------------------------------------------------------------------------------*/
#taxon_history_container .release .lineage-export-row {
   align-items: center;
   display: flex;
   flex-flow: row;
   justify-content: flex-start;
   margin: 0.75rem 0 0.5rem 0;
   white-space: nowrap;
}

#taxon_history_container .release .lineage-export-row .label {
   font-size: 1.0rem;
   margin-right: 0.25rem;
}

#taxon_history_container .release .lineage-export-row button {
   background-color: var(--ictv-button-bg);
   border-color: var(--ictv-button-border-color);
   border-radius: 5px;
   border-style: solid;
   border-width: 1px;
   font-size: 0.9rem;
   margin-right: 0.5rem;
   padding: .2rem .5rem;
   text-align: center;
}
#taxon_history_container .release .lineage-export-row button i {
   color: #555;
   font-weight: normal;
   margin-right: 0.25rem;
   pointer-events: none;
}

#taxon_history_container .release .lineage-export-row .copy-status i {
   color: var(--ictv-success-color); /*rgb(40, 167, 69);*/
}

#taxon_history_container .release .lineage-export-row .copy-status {
   margin-left: 1.0rem;
}



/*-------------------------------------------------------------------------------------------------------------------------------------------------
   Tooltips
-------------------------------------------------------------------------------------------------------------------------------------------------*/
#taxon_history_container .has-tooltip {
   border-bottom: 1px dashed black;
   cursor: pointer;
   display: inline-block;
   position: relative;
}
#taxon_history_container .has-tooltip .tooltip {
   background-color: #555;
   border-radius: 6px;
   color: #fff;
   left: 125%;
   opacity: 0;
   padding: 0.5em 0.5rem 0.5rem 0.75rem;
   position: absolute;
   text-align: left;
   top: -5px;
   visibility: hidden;
   width: 180px;
}
#taxon_history_container .has-tooltip .tooltip::after {
   border-color: transparent #555 transparent transparent;
   border-style: solid;
   border-width: 5px;
   content: "";
   margin-top: 5px;
   position: absolute;
   right: 100%;
   top: 10%;
}
#taxon_history_container .has-tooltip:hover .tooltip {
   opacity: 1;
   visibility: visible;
   z-index: 10000;
}



/*-------------------------------------------------------------------------------------------------------------------------------------------------
   The taxon proposal for a taxon in a release
-------------------------------------------------------------------------------------------------------------------------------------------------*/
#taxon_history_container .release .taxon-proposal {
   align-items: flex-start;
   display: flex;
   flex-flow: row nowrap;
   justify-content: flex-start;
   margin: 0.5rem 0 0.5rem 0;
}

#taxon_history_container .release .taxon-proposal a {
   font-size: 1.0rem;
}

#taxon_history_container .release .taxon-proposal .label{
   font-size: 1.0rem;
   margin: 0.1rem 0.4rem 0 0;
}

#taxon_history_container .release .taxon-proposal i {
   color: #888;
   font-size: 14pt;
}

#taxon_history_container .release .taxon-proposal-link:hover {
   text-decoration: underline;
}

#taxon_history_container .release .taxon-proposal-link i:hover {
   text-decoration: none;
}


/*-------------------------------------------------------------------------------------------------------------------------------------------------
   Modal dialog
-------------------------------------------------------------------------------------------------------------------------------------------------*/
/* The dialog background */
#taxon_history_container .modal-dialog {
   background-color: rgba(0,0,0,0.4);
   display: none; /* Hidden by default */
   height: 100%; /* Full height */
   left: 0;
   overflow: auto; /* Enable scroll if needed */
   pointer-events: auto;
   position: fixed; /* Stay in place */
   top: 0;
   width: 100%; /* Full width */
}

#taxon_history_container .modal-content {
   background-color: #efefef;
   border-color: #999;
   border-radius: 10px;
   border-style: solid;
   border-width: 1px;
   height: fit-content;
   margin: 15% auto; /* 15% from the top and centered */
   width: fit-content;
   z-index: 200;
}

#taxon_history_container .modal-header {
   align-items: center;
   background-color: var(--ictv-modal-header-bg);
   border-radius: 10px 10px 0 0;
   display: flex;
   flex-flow: row nowrap;
   justify-content: center;
   padding: 0.5rem;
   width: 100%;
}
#taxon_history_container .modal-title {
   color: #fff;
   font-size: 1.2rem;
}

#taxon_history_container .modal-body {
   padding: 0.5rem 1.0rem 1.0rem 1.0rem;
}
#taxon_history_container .modal-footer {
   padding: 0 0.5rem 0.5rem 0.5rem;
}

#taxon_history_container .settings-row {
   align-items: center;
   display: flex;
   flex-flow: row nowrap;
   justify-content: flex-start;
   margin-top: 1.0rem;
   min-width: 500px;
}

#taxon_history_container .settings-row .settings-label {
   font-size: 1.0rem;
   margin-right: 0.25rem;
   white-space: nowrap;
}

#taxon_history_container .settings-row select {
   border-radius: 5px !important;
   font-size: 0.9rem !important;
   margin-right: 0.25rem;
   padding: 2px 5px !important;
}

#taxon_history_container .settings-row .include-empty-control {
   height: 16px;
   margin-left: 0.25rem;
   width: 16px;
}

#taxon_history_container .modal-footer {
   align-items: center;
   display: flex;
   flex-flow: row nowrap;
   justify-content: flex-end;
}
#taxon_history_container .modal-footer .btn {
   cursor: pointer; 
   font-size: 1.0rem;
   padding: .2rem .5rem;
   text-align: center;
}
#taxon_history_container .modal-footer .btn i {
   margin-right: 0.25rem;
}
#taxon_history_container .modal-footer .close-button {
   border-color: #777;
   border-radius: 5px;
   border-style: solid;
   border-width: 1px;
}
#taxon_history_container .modal-footer .save-button {
   margin-right: 0.5rem;
}



/*----------------------------------------------------------------------------------------------------------------
  The lineage tooltip 
----------------------------------------------------------------------------------------------------------------*/
#taxon_history_container .tippy-box[data-theme~='ICTV-Tooltip'] {
   background-color: #eee;
   border-color: #aaa;
   border-style: solid;
   border-width: 1px;
   color: #000;
}

#taxon_history_container .tippy-box[data-theme~='ICTV-Tooltip'] .tippy-arrow {
   color: #ccc;
   z-index: 10;
}

#taxon_history_container .lineage-tooltip {
   min-width: 260px;
   z-index: 1000;
}
#taxon_history_container .lineage-tooltip .name-row {
   border-color: #aaa;
   border-style: solid;
   border-width: 0 0 1px 0;
   display: flex;
   flex-flow: row nowrap;
   font-size: 1.0rem;
   margin-bottom: 0.5rem;
}
#taxon_history_container .lineage-tooltip .name-row .rank-name {
   margin-right: 0.25rem;
}
#taxon_history_container .lineage-tooltip .name-row .taxon-name {
   font-style: italic;
}
#taxon_history_container .lineage-tooltip .link-row {
   font-size: 0.9rem;
   margin-bottom: 0.5rem;
}
