/* Colors */
html.light {
    --Whiteish: #FFFCFF;
    --Goldish: #F7D457;
    --Dark-blue: #2B4354;
    --disabled_grey: #c2c2c2;

    --navbar-active: #020201;
    --navbar-inactive: #e6ebee;
} 

/*General*/
body {
    background-color: var(--Whiteish);
}
.content-container {
    margin: 4rem auto;
    padding: 2rem;
    max-width: calc(80% - 4em);
    min-width: 80%;
    text-align: center;
    border-radius: 1.5rem;
}

/* Navbar */
#logo_index {
    height: 2rem;
    padding-right: 1.5rem;
}
.navbar {
    background-color: var(--Dark-blue) !important;
    font-size: 1.5rem;
}

a.nav-link {
    margin-left: 2rem;
}

.nav-link.text-white {
    color: var(--Whiteish) !important;
}
.nav-link.active-link {
    color: var(--Goldish) !important;
}
.nav-link.inactive-link {
    color: var(--navbar-inactive) !important;
}
.nav-link.inactive-link:hover {
    color: var(--Goldish) !important;
}
.navbar-brand {
    padding-left: 2rem;
    color: var(--navbar-active) !important;
}

/*---------*/
/*Home Page*/
/*---------*/

/*Welcome message */
.home_info {
    margin-left: 2rem;
    margin-right: 2rem;
    padding: 4rem;
    align-items: center;
    color: var(--Dark-blue);
}

.Welcome_msg {
    flex: 1;
    max-width: 50vw;
    font-size: 150%;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.Welcome_msg::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("/static/img/HERA_background_home.jpg") center center / contain no-repeat;
    opacity: 0.3;
    z-index: 0;
}

.Welcome_msg > * {
    position: relative;
    z-index: 1;
}

.anal-btns {
    text-align: center;
}


.HERA_highlights {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

#usr_friend, #fast, #efficient {
    flex: 1;
    border: solid 1px var(--Dark-blue);
    background-color: transparent;
    text-align: center;
    color: var(--Dark-blue);
    border-radius: 0.3rem;

    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: clamp(50px, 10vh, 70px);
}

#usr_friend p, #fast p, #efficient p {
    margin: 0;
}

.anal-btn {
    box-shadow: rgba(0, 0, 0, 0.25) 0px 54px 55px, rgba(0, 0, 0, 0.12) 0px -12px 30px, rgba(0, 0, 0, 0.12) 0px 4px 6px, rgba(0, 0, 0, 0.17) 0px 12px 13px, rgba(0, 0, 0, 0.09) 0px -3px 5px;
    background-color: var(--Whiteish);
    color: var(--Dark-blue);
    border-radius: 0.3rem;
    font-weight: bold;
    font-size: 1.5rem;
}

.anal-btn:hover {
    background-color: var(--Goldish);
    color: var(--Dark-blue);
}


/*-------------------------*/
/*Analysis and Results Page*/
/*-------------------------*/

/*Container for Analysis and Results Section*/
.analysis_container { 
    margin: 2rem auto;
    padding: 2rem;
    max-width: calc(80% - 4em);
    min-width: 80%;
    border-radius: 0.3rem;
    box-shadow: rgba(0, 0, 0, 0.12) 0px -12px 30px, rgba(0, 0, 0, 0.12) 0px 4px 6px, rgba(0, 0, 0, 0.17) 0px 12px 13px, rgba(0, 0, 0, 0.09) 0px -3px 5px;
    color: var(--Dark-blue);
    align-content: center;
}

/*Analysis setup*/
.analysis_header {
    background-color: var(--Dark-blue);
    color: var(--Goldish);
    text-align: center;
    margin: 1rem auto;
    padding: 1rem;
    max-width: calc(80% - 4em);
    min-width: 80%;
    border-radius: 0.2rem;
    box-shadow: rgba(0, 0, 0, 0.12) 0px -12px 30px, rgba(0, 0, 0, 0.12) 0px 4px 6px, rgba(0, 0, 0, 0.17) 0px 12px 13px, rgba(0, 0, 0, 0.09) 0px -3px 5px;
}
.analysis_header h1 {
    font-weight: bold;
}

.job_description_header {
    background-color: var(--Dark-blue);
    margin-bottom: 0rem;
    padding-top: 0.5rem;
    padding-bottom: 0.3rem;
    border-radius: 0.3rem 0.3rem 0rem 0rem;
}

.job_description {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-direction: column;
    background-color: var(--Whiteish);
    margin-top: 0rem;
    padding-top: 0rem;
    border-radius: 0rem 0rem 0.3rem 0.3rem;
}

#task_id, #job_id {
    width: 100%;
    box-sizing: border-box;
}

.input_header {
    background-color: var(--Dark-blue);
    margin-bottom: 0rem;
    padding-top: 0.5rem;
    padding-bottom: 0.3rem;
    border-radius: 0.3rem 0.3rem 0rem 0rem;
}

.input_info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-direction: column;
    background-color: var(--Whiteish);
    margin-top: 0rem;
    padding-top: 0rem;
    border-radius: 0rem 0rem 0.3rem 0.3rem;
}

.inpt_align_info {
    display: flex;
    gap: 2rem;
    width: 100%;
    align-items: flex-start;
    flex-wrap: wrap;
}

.inpt_align {
    flex: 1 1 320px;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

#advanced-ref-box {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-top: 0.3rem;
}

.adv-ref-block {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    width: 100%;
}

.adv-ref-block label {
    margin: 0;
    padding-top: 0.3rem;
}

.adv-ref-block textarea {
    width: 100%;
    box-sizing: border-box;
    resize: vertical;
}
.param-row {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    width: 100%;
    padding-top: 0.3rem;
}

.param-row label {
    margin: 0;
    white-space: nowrap;
    flex-shrink: 0;
}

.param-row select {
    flex: 1;
    min-width: 0;
}

.param-col {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1 1 0;
    min-width: 0;
}

.param-col label {
    margin: 0;
    display: flex;
    align-items: center;
    align-self: center;
    white-space: nowrap;
    flex: 0 0 auto;
    font-size: 100%;
    line-height: 1;
}

.param-col input {
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

#add_files_btn {
    display: inline;
    background-color: var(--Dark-blue);
    color: var(--Whiteish);
    border-radius: 0.3rem;
    width: 100%;
}

#load-btn {
    display: inline;
    background-color: var(--Dark-blue);
    color: var(--Whiteish);
    border-radius: 0.3rem;
    width: 100%;
    box-sizing: border-box;
}

.analyze_start_btn {
    background-color: var(--Goldish);
    padding: 0rem;
    border-color: var(--Goldish);
    border-radius: 0.3rem;
    padding: 0.2rem;
    box-shadow: rgba(201, 160, 9, 0.12) 0px -12px 30px, rgba(201, 160, 9, 0.12) 0px 4px 6px, rgba(201, 160, 9, 0.17) 0px 12px 13px, rgba(201, 160, 9, 0.09) 0px -3px 5px;
}

/* Extended Analysis Tool Cards */
.ext-tool-card {
    border: 1px solid var(--Dark-blue);
    border-radius: 0.3rem;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.ext-tool-header {
    padding: 0.6rem 0.9rem;
    background: var(--Whiteish);
    transition: background 0.15s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ext-tool-link {
    flex-shrink: 0;
    color: var(--Dark-blue);
    font-size: 0.75rem;
    opacity: 0.5;
    line-height: 1;
}
.ext-tool-link:hover { opacity: 1; }

.ext-tool-header:hover {
    background: #eef2f5;
}

.ext-tool-label {
    cursor: pointer;
    font-weight: normal;
    font-size: 1rem;
    margin: 0;
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
}

.ext-tool-label input[type="checkbox"] {
    flex-shrink: 0;
    accent-color: var(--Dark-blue);
    align-self: center;
}

.ext-tool-params {
    display: none;
    background: #f5f7f9;
    border-top: 1px solid var(--Dark-blue);
    padding: 0.8rem 1rem;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.6rem 1.2rem;
}

.ext-tool-params.active {
    display: grid;
}

.ext-param-row {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.ext-param-row label {
    font-weight: 600;
    font-size: 0.85rem;
    margin: 0;
    color: var(--Dark-blue);
}

.ext-param-row small {
    color: #666;
    font-size: 0.75rem;
    line-height: 1.2;
}

.ext-param-row input[type="number"], .ext-param-row select {
    padding: 0.25rem 0.4rem;
    border: 1px solid #aaa;
    border-radius: 0.2rem;
    width: 100%;
    font-size: 0.9rem;
    background: var(--Whiteish);
}

.ext-badge {
    display: inline-block;
    background: var(--Goldish);
    color: var(--Dark-blue);
    font-size: 0.65rem;
    font-weight: bold;
    padding: 0.1rem 0.4rem;
    border-radius: 0.2rem;
    vertical-align: middle;
    margin-left: 0.3rem;
    flex-shrink: 0;
    align-self: center;
}

#launch-button {
    background-color: var(--Goldish);
    color: var(--Dark-blue);
    border: none;
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 0.3rem;
}

.analysis_window h2 {
    background-color: var(--Dark-blue);
    color: var(--Goldish);
    display: block;
}

.analysis_window label {
    font-weight: bold;
    font-size: 125%;
}

/*Results section*/
.results_job {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    background-color: var(--Whiteish);
    border-radius: 0.3rem;
}

.results_job label {
    font-weight: bold;
    font-size: 125%;
}

/*--------------------*/
/*get_progress styling*/
/*--------------------*/
#icon-container p {
    text-align: center;
    font-size: 120%;
}

#status-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 160px;
  height: 160px;
  margin: 30px auto;
}

#status-icon i {
  font-size: 4rem;
  text-align: center;
}

.plasmid-loader {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 40px auto;
}

.plasmid-loader::before,
.plasmid-loader::after,
.plasmid-loader div {
    content: '';
    position: absolute;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 8px solid rgba(43, 67, 84, 0.25);
    animation: rotate 5s linear infinite;
}

.plasmid-loader::before {
    width: 140px;
    height: 140px;
    border-top-color: #2B4354;
    animation-duration: 7s;
}

.plasmid-loader div {
    width: 110px;
    height: 110px;
    border-left-color: #F7D457;
    animation-delay: 0.5s;
    animation-direction: reverse;
    animation-duration: 6s;
}

.plasmid-loader::after {
    width: 80px;
    height: 80px;
    border-right-color: #2B4354;
    animation-duration: 5s;
}

.icn-success {
    color: green;
}

.icn-error {
    color: red;
}

@keyframes rotate {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}
/*---------------*/
/*Results window */
/*---------------*/

#cgv_container {
    margin: 1rem auto;
    padding: 1rem;
    width: 90vw;
    height: 85vh;
    border-radius: 0.3rem;
    position: relative;
}

#div_options {
    display: block;
    padding: 2rem;
    overflow-y: auto;
}

/* Custom legends */
#CG_View {
    position: relative;
}


#CG_View .d3_custom_legs {
    position: absolute;
    z-index: 1000;
    pointer-events: auto;
    top: 15px;
    right: 15px;
    border: 1px solid #000000;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 0.3rem;
    padding: 8px 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 100; 
}

#CG_View .legend-title {
  font-family: "Arial", sans-serif;
  font-weight: bold;
  fill: #2B4354;
  font-size: 15px;
  user-select: none;
}

#CG_View .query-title-box {
    position: absolute;
    z-index: 1000;
}

/* Progress page — per-step status rows */
#steps-list {
    max-width: 420px;
    margin: 0.5rem auto 0;
    text-align: left;
}
.progress-step {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 1rem;
    border-radius: 0.4rem;
    margin-bottom: 0.35rem;
    background: var(--Whiteish);
    border: 1px solid #dee2e6;
    font-size: 0.92rem;
}
.step-icon { width: 1.1rem; text-align: center; flex-shrink: 0; }
.step-name  { flex: 1; font-weight: 500; color: var(--Dark-blue); }
.step-status { font-size: 0.78rem; }
