/* ######################################################################################
   # Global layout, fonts, base stylings
   ###################################################################################### */

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
    font-family: "Open Sans", sans-serif;
    background-color: #f6f6f6;
    font-size: 12.5px;
}

#react-entry-point,
#react-entry-point > div {
    height: 100%;
    width: 100%;
}

/* ######################################################################################
   # Header and branding
   ###################################################################################### */

.app-header {
    height: 60px;
    line-height: 60px;
    border-bottom: thin lightgrey solid;
    display: flex;
    background-color: #301279;
    color: #EDAE49;           
    padding-left: 20px;
    width: 100%;
}

.app-header .app-header--title,
.app-header--title,
.app-header--title {
    display: flex;
    align-items: center;
}

.app-header .app-header--title {
    font-size: 22px;
    padding-left: 5px;
    height: 42px;
    margin-left: 10px;
    padding-top: 12px;
}

.app-header--logo {
    height: 50px;
    margin-left: 2px;
    padding-top: 6px;
    display: flex;
    align-items: center;
}

.github-button {
    display: flex;
    align-items: center;
    margin-left: auto;
    margin-right: 20px;
    padding: 8px 16px;
    border: 0px solid white;
    border-radius: 6px;
    background-color: transparent;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

.github-button:hover {
    background-color: white;
    color: #301279;
    text-decoration: none;
}

.github-icon {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    filter: brightness(0) invert(1);
}

.github-button:hover .github-icon {
    filter: brightness(0) invert(0.18) sepia(0.82) saturate(1.96) hue-rotate(266deg) brightness(0.25) contrast(1.09);
}

.github-text {
    font-family: "Open Sans", sans-serif;
}

/* ######################################################################################
   # Summary Blocks
   ###################################################################################### */

.summary-block {
    background-color: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    font-family: "Open Sans", sans-serif;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding: 5px 0;
}

.summary-item:last-child {
    margin-bottom: 0;
}

.summary-label {
    color: #301279;
    font-weight: 600;
    font-size: 13px;
    flex: 1;
    margin-right: 15px;
}

.summary-value {
    color: #1C1C2C;
    font-size: 13px;
    font-weight: 400;
    text-align: right;
    flex: 0 0 auto;
}

.summary-placeholder {
    color: #666;
    font-style: italic;
    text-align: center;
    margin: 0;
    padding: 10px 0;
}

.summary-section-header {
    color: #301279;
    font-family: "Open Sans", sans-serif;
    font-size: 16px;
    font-weight: 600;
    margin: 20px 0 10px 0;
    padding: 0;
    border: none;
    text-transform: none;
    letter-spacing: 0.3px;
}

.summary-multiline {
    text-align: right;
    flex: 0 0 auto;
}

.summary-multiline div {
    color: #1C1C2C;
    font-size: 13px;
    font-weight: 400;
    margin: 1px 0;
}

/* ######################################################################################
   # Initial Loading Screen
   ###################################################################################### */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #301279;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    z-index: 0;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.logo-progress-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 450px;
    height: 450px;
}

.loading-logo {
    width: 300px;
    height: auto;
    max-width: 80vw;
    z-index: 2;
    position: relative;
    will-change: transform;
    transform: translateZ(0);
}

.progress-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translateZ(0);
    width: 450px;
    height: 450px;
    z-index: 1;
    backface-visibility: hidden;
    will-change: contents;
    contain: layout style paint;
}

#progress-circle {
    width: 100% !important;
    height: 100% !important;
    pointer-events: none;
    transform: translateZ(0);
    will-change: contents;
    contain: layout style paint;
}

#progress-circle .js-plotly-plot {
    width: 100% !important;
    height: 100% !important;
    pointer-events: none;
    transform: translateZ(0);
}

#progress-circle svg {
    shape-rendering: crispEdges;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.pulsing {
    animation: pulse 2s ease-in-out infinite;
    animation-delay: 0.2s;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 0.8;
    }
}

@keyframes pulse-ring {
    0% {
        transform: translate(-50%, -50%);
        filter:
            drop-shadow(0 0 12px rgba(255, 255, 255, 0.8))
            drop-shadow(0 0 24px rgba(255, 255, 255, 0.6))
            drop-shadow(0 0 36px rgba(255, 255, 255, 0.4));
    }
    50% {
        transform: translate(-50%, -50%);
        filter:
            drop-shadow(0 0 16px rgba(255, 255, 255, 1.0))
            drop-shadow(0 0 32px rgba(255, 255, 255, 0.8))
            drop-shadow(0 0 48px rgba(255, 255, 255, 0.6));
    }
    100% {
        transform: translate(-50%, -50%);
        filter:
            drop-shadow(0 0 12px rgba(255, 255, 255, 0.8))
            drop-shadow(0 0 24px rgba(255, 255, 255, 0.6))
            drop-shadow(0 0 36px rgba(255, 255, 255, 0.4));
    }
}

/* Twinkling transcript constellation effects!!! */
.constellation {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.transcript-star {
    position: absolute;
    opacity: 0;
    animation: twinkle 3s ease-in-out infinite;
}

.transcript-star {
    position: absolute;
    height: 2px;
    opacity: 0;
    animation: twinkle 3s ease-in-out infinite;
}

/* 2-exon transcripts */
.exons-2 {
    width: 84px;
    background: linear-gradient(to right, 
        transparent 24px, 
        #85929E 24px, 
        #85929E 52px, 
        transparent 52px
    );
    box-shadow: 0 0 8px rgba(133, 146, 158, 0.4);
}

.exons-2::before {
    content: '';
    position: absolute;
    width: 24px;
    height: 12px;
    background: #EDAE49;
    border-radius: 2px;
    box-shadow: 0 0 16px rgba(237, 174, 73, 0.6);
    left: 0px;
    top: -5px;
    z-index: 2;
}

.exons-2::after {
    content: '';
    position: absolute;
    width: 32px;
    height: 12px;
    background: #EDAE49;
    border-radius: 2px;
    box-shadow: 0 0 16px rgba(237, 174, 73, 0.6);
    left: 52px;
    top: -5px;
    z-index: 2;
}

/* 3-exon transcripts */
.exons-3 {
    width: 128px;
    background: linear-gradient(to right, 
        transparent 20px, 
        #85929E 20px, 
        #85929E 48px, 
        transparent 48px,
        transparent 76px,
        #85929E 76px,
        #85929E 104px,
        transparent 104px
    );
    box-shadow: 0 0 8px rgba(133, 146, 158, 0.4);
}

.exons-3::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 12px;
    background: #EDAE49;
    border-radius: 2px;
    box-shadow: 
        0 0 16px rgba(237, 174, 73, 0.6),
        104px 0 0 #EDAE49;
    left: 0px;
    top: -5px;
    z-index: 2;
}

.exons-3::after {
    content: '';
    position: absolute;
    width: 28px;
    height: 12px;
    background: #EDAE49;
    border-radius: 2px;
    box-shadow: 0 0 16px rgba(237, 174, 73, 0.6);
    left: 48px;
    top: -5px;
    z-index: 2;
}

/* 4-exon transcripts */
.exons-4 {
    width: 168px;
    background: linear-gradient(to right, 
        transparent 18px, 
        #85929E 18px, 
        #85929E 42px, 
        transparent 42px,
        transparent 66px,
        #85929E 66px,
        #85929E 90px,
        transparent 90px,
        transparent 114px,
        #85929E 114px,
        #85929E 150px,
        transparent 150px
    );
    box-shadow: 0 0 8px rgba(133, 146, 158, 0.4);
}

.exons-4::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 12px;
    background: #EDAE49;
    border-radius: 2px;
    box-shadow: 
        0 0 16px rgba(237, 174, 73, 0.6),
        48px 0 0 #EDAE49,
        96px 0 0 #EDAE49,
        150px 0 0 #EDAE49;
    left: 0px;
    top: -5px;
    z-index: 2;
}

.exons-4::after {
    content: '';
    position: absolute;
    width: 0px;
    height: 0px;
    left: 0px;
    top: 0px;
    z-index: 2;
}

/* 5-exon transcripts */
.exons-5 {
    width: 200px;
    background: linear-gradient(to right, 
        transparent 16px, 
        #85929E 16px, 
        #85929E 36px, 
        transparent 36px,
        transparent 56px,
        #85929E 56px,
        #85929E 76px,
        transparent 76px,
        transparent 96px,
        #85929E 96px,
        #85929E 116px,
        transparent 116px,
        transparent 136px,
        #85929E 136px,
        #85929E 176px,
        transparent 176px
    );
    box-shadow: 0 0 8px rgba(133, 146, 158, 0.4);
}

.exons-5::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 12px;
    background: #EDAE49;
    border-radius: 2px;
    box-shadow: 
        0 0 16px rgba(237, 174, 73, 0.6),
        40px 0 0 #EDAE49,
        80px 0 0 #EDAE49,
        120px 0 0 #EDAE49,
        160px 0 0 #EDAE49;
    left: 0px;
    top: -5px;
    z-index: 2;
}

.exons-5::after {
    content: '';
    position: absolute;
    width: 0px;
    height: 0px;
    left: 0px;
    top: 0px;
    z-index: 2;
}

/* 6-exon transcripts */
.exons-6 {
    width: 240px;
    background: linear-gradient(to right, 
        transparent 14px, 
        #85929E 14px, 
        #85929E 32px, 
        transparent 32px,
        transparent 50px,
        #85929E 50px,
        #85929E 68px,
        transparent 68px,
        transparent 86px,
        #85929E 86px,
        #85929E 104px,
        transparent 104px,
        transparent 122px,
        #85929E 122px,
        #85929E 140px,
        transparent 140px,
        transparent 158px,
        #85929E 158px,
        #85929E 208px,
        transparent 208px
    );
    box-shadow: 0 0 8px rgba(133, 146, 158, 0.4);
}

.exons-6::before {
    content: '';
    position: absolute;
    width: 14px;
    height: 12px;
    background: #EDAE49;
    border-radius: 2px;
    box-shadow: 
        0 0 16px rgba(237, 174, 73, 0.6),
        36px 0 0 #EDAE49,
        72px 0 0 #EDAE49,
        108px 0 0 #EDAE49,
        144px 0 0 #EDAE49,
        194px 0 0 #EDAE49;
    left: 0px;
    top: -5px;
    z-index: 2;
}

.exons-6::after {
    content: '';
    position: absolute;
    width: 0px;
    height: 0px;
    left: 0px;
    top: 0px;
    z-index: 2;
}

/* Size variations to make it look more interesting when they twinkle*/
.transcript-1.exons-2::before { width: 20px; }
.transcript-5.exons-2::after { width: 28px; }
.transcript-9.exons-2::before { width: 28px; }
.transcript-13.exons-2::before { width: 18px; }

.transcript-3.exons-3::before { width: 16px; }
.transcript-7.exons-3::after { width: 24px; }
.transcript-11.exons-3::before { width: 24px; }
.transcript-15.exons-4::after { width: 20px; }

.transcript-2.exons-4::before { width: 16px; }
.transcript-10.exons-4::before { width: 22px; }
.transcript-15.exons-4::before { width: 20px; }

.transcript-4.exons-5::before { width: 14px; }
.transcript-8.exons-5::before { width: 18px; }
.transcript-14.exons-5::before { width: 20px; }

.transcript-6.exons-6::before { width: 12px; }
.transcript-12.exons-6::before { width: 16px; }

/* Individual positioning and timing for each transcript star to add some more variance... */
.transcript-1 { top: 15%; left: 10%; animation-delay: 0s; }
.transcript-2 { top: 25%; left: 85%; animation-delay: 0.5s; }
.transcript-3 { top: 35%; left: 15%; animation-delay: 1s; }
.transcript-4 { top: 45%; left: 80%; animation-delay: 1.5s; }
.transcript-5 { top: 55%; left: 12%; animation-delay: 2s; }
.transcript-6 { top: 65%; left: 88%; animation-delay: 2.5s; }
.transcript-7 { top: 75%; left: 8%; animation-delay: 0.3s; }
.transcript-8 { top: 85%; left: 82%; animation-delay: 0.8s; }
.transcript-9 { top: 20%; left: 70%; animation-delay: 1.3s; }
.transcript-10 { top: 30%; left: 25%; animation-delay: 1.8s; }
.transcript-11 { top: 40%; left: 5%; animation-delay: 2.3s; }
.transcript-12 { top: 50%; left: 92%; animation-delay: 0.2s; }
.transcript-13 { top: 60%; left: 30%; animation-delay: 0.7s; }
.transcript-14 { top: 70%; left: 75%; animation-delay: 1.2s; }
.transcript-15 { top: 80%; left: 35%; animation-delay: 1.7s; }

@keyframes twinkle {
    0%, 20% {
        opacity: 0;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
    80%, 100% {
        opacity: 0;
        transform: scale(0.8);
    }
}

/* ######################################################################################
   # Panel layout and dashboard sectioning styles
   ###################################################################################### */

.app-body {
    display: flex;
    height: calc(100vh - 60px);
    width: 100%;
    overflow: hidden;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: auto;
    padding-bottom: 40px;
}

.panels-container {
    display: flex;
    flex: 0 0 auto;
    gap: 20px;
    padding: 20px 20px 0px 20px;
    width: 100%;
    height: auto;
    box-sizing: border-box;
    overflow: hidden;
}

.panel {
    display: flex;
    flex-direction: column;
    flex: 1;
    background-color: white;
    padding: 15px 15px 15px 15px;
    border-radius: 8px;
    box-shadow: 0px 0px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    min-height: 600px;
    height: auto;
    color: #1C1C2C;
    transition: height 0.3s ease, min-height 0.3s ease;
    min-width: 0;
}

#left-panel {
    flex: 1;
}

#right-panel {
    flex: 1.2;
}

.top-panel {
    width: 100%;
    background-color: white;
    padding: 15px;
    border-radius: 0;
    min-height: 300px;
    height: auto;
    color: #1C1C2C;
    transition: height 0.3s ease, min-height 0.3s ease;
    box-sizing: border-box;
}

.panel-header {
    font-family: "Open Sans", "Segoe UI", Arial, sans-serif;
    font-size: 1.42rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: white;
    background: linear-gradient(135deg, #301279 0%, #622e9d 100%);
    text-align: center;
    box-shadow: 0 2px 8px rgba(48, 18, 121, 0.15);
    margin: 0;
    padding: 15px 20px;
    border-radius: 0;
    border-bottom: 3px solid #EDAE49;
    position: relative;
    text-transform: uppercase;
    height: 70px;
    line-height: 20px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

.top-panel-header {
    width: 100%;
    font-family: "Open Sans", "Segoe UI", Arial, sans-serif;
    font-size: 1.42rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: white;
    background: linear-gradient(135deg, #301279 0%, #622e9d 100%);
    text-align: center;
    box-shadow: 0 2px 8px rgba(48, 18, 121, 0.15);
    margin: 0;
    padding: 15px 20px;
    border-radius: 0;
    border-bottom: 3px solid #EDAE49;
    position: relative;
    text-transform: uppercase;
    height: 70px;
    line-height: 20px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

.panel-header::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #EDAE49 0%, #f2c668 100%);
    border-radius: 0 0 2px 2px;
}

.panel-with-header {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: 50%;
    overflow: hidden;
}

.top-panel-with-header {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    padding: 20px 20px 0px 20px;
    box-sizing: border-box;
}

.panel-with-header .panel {
    border-radius: 0 0 8px 8px;
    margin-top: 0;
}

.control-tab .tab-2 h2 {
    font-family: "Inter", "Segoe UI", "SF Pro Display", "Roboto", "Helvetica Neue", sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -0.2px;
    color: white;
    background: linear-gradient(135deg, #5a2a91 0%, #925ddd 100%);
    text-align: center;
    box-shadow: 0 4px 12px rgba(98, 46, 157, 0.2);
    margin: 0 0 25px 0;
    padding: 5px 20px;
    border-radius: 0;
    border-bottom: 3px solid #EDAE49;
    position: relative;
    text-transform: uppercase;
    height: 70px;
    line-height: 20px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-tab h2::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #EDAE49 0%, #f2c668 100%);
    border-radius: 0 0 2px 2px;
}

@media (max-width: 768px) {
    .panel-header {
        font-size: 1rem;
        padding: 12px 15px;
        letter-spacing: 0.3px;
    }
    
    .panel-header::after {
        width: 40px;
        height: 2px;
    }
    
    .control-tab h2 {
        font-size: 1rem;
        padding: 12px 15px;
        letter-spacing: 0.3px;
        height: 60px;
    }
    
    .control-tab h2::after {
        width: 40px;
        height: 2px;
    }
    
    .app-controls-block {
        margin-bottom: 20px;
        padding: 15px;
    }
    
    .app-controls-query {
        font-size: 15px;
    }
    
    .alignment-settings-section {
        font-size: 15px;
    }
}

/* ######################################################################################
   # Sidebar stuff (controls, tabs)
   ###################################################################################### */

.control-tabs {
    height: 100%;
    font-family: "Inter", "Segoe UI", "SF Pro Display", "Roboto", "Helvetica Neue", sans-serif;
    overflow: auto;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 0 0 8px 8px;
    font-weight: 400;
    letter-spacing: -0.2px;
}

.control-tab {
    padding: 0px 20px 150px 20px;
    box-sizing: border-box;
    height: auto;
    overflow: visible;
    position: relative;
    z-index: 1;
}

.app-controls-block {
    margin-bottom: 25px;
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #EDAE49;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.app-controls-block:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.app-controls-name {
    margin-bottom: 8px;
    font-weight: 600;
    color: #301279;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.app-controls-query {
    font-size: 16px;
    margin-bottom: 12px;
    font-weight: 700;
    color: #301279;
    border-bottom: 2px solid #EDAE49;
    padding-bottom: 8px;
    display: inline-block;
}

.app-controls-query h2 {
    font-family: "Inter", "Segoe UI", "SF Pro Display", "Roboto", "Helvetica Neue", sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -0.2px;
    color: white;
    background: linear-gradient(135deg, #5a2a91 0%, #925ddd 100%);
    text-align: center;
    box-shadow: 0 4px 12px rgba(98, 46, 157, 0.2);
    margin: 0 0 25px 0;
    padding: 5px 20px;
    border-radius: 0;
    border-bottom: 3px solid #EDAE49;
    position: relative;
    text-transform: uppercase;
    height: 70px;
    line-height: 20px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-controls-desc {
    margin-top: 8px;
    color: #506784;
    font-size: 13px;
    line-height: 1.4;
}

.alignment-settings-section {
    font-size: 16px;
    margin: 25px 0 15px 0;
    font-weight: 600;
    color: #622e9d;
    font-family: "Inter", "Segoe UI", "SF Pro Display", "Roboto", "Helvetica Neue", sans-serif;
    letter-spacing: -0.3px;
    text-transform: uppercase;
    border-bottom: 2px solid #622e9d;
    padding-bottom: 8px;
    display: inline-block;
    position: relative;
}

.alignment-settings-section::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, #EDAE49 0%, #f2c668 100%);
    border-radius: 1px;
}

.about-logo-header-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 25px;
    margin-top: 10px;
}

.about-logo {
    flex-shrink: 0;
}

.about-tab-header {
    font-family: "Open Sans", "Segoe UI", Arial, sans-serif;
    font-size: 1.54rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #622e9d;
    background: none;
    text-align: right;
    box-shadow: none;
    margin: 0;
    padding: 15px;
    border: none;
    position: relative;
    text-transform: uppercase;
    height: auto;
    line-height: 1.2;
    box-sizing: border-box;
    display: block;
    flex-shrink: 0;
}

.about-content {
    margin-top: 20px;
    padding: 25px;
    background: linear-gradient(135deg, #fafbfc 0%, #ffffff 100%);
    border-radius: 12px;
    border: 1px solid rgba(225, 229, 233, 0.6);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.about-content p {
    font-family: "Inter", "Segoe UI", "SF Pro Display", "Roboto", "Helvetica Neue", sans-serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.7;
    color: #2c3e50;
    margin: 0 0 18px 0;
    letter-spacing: -0.1px;
}

.about-content p:last-child {
    margin-bottom: 0;
}

.about-keyword-purple {
    color: #622e9d;
    font-weight: 600;
    background: rgba(98, 46, 157, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.about-keyword-gold {
    color: #EDAE49;
    font-weight: 600;
    background: rgba(237, 174, 73, 0.12);
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.about-keyword-purple:hover,
.about-keyword-gold:hover {
    transform: scale(1.05);
}

.knowles-lab-link {
    color: #622e9d;
    text-decoration: none;
    font-weight: 600;
    background: linear-gradient(to right, #622e9d, #622e9d) no-repeat;
    background-size: 0% 2px;
    background-position: left bottom;
    padding-bottom: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: inline-block;
}

.knowles-lab-link:hover {
    color: #4a1f7a;
    background-size: 100% 2px;
    letter-spacing: 0.3px;
}

.query-content {
    margin-top: 15px;
    padding: 25px;
    background: linear-gradient(135deg, #fafbfc 0%, #ffffff 100%);
    border-radius: 12px;
    border: 1px solid rgba(225, 229, 233, 0.6);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.query-content p {
    font-family: "Inter", "Segoe UI", "SF Pro Display", "Roboto", "Helvetica Neue", sans-serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.7;
    color: #2c3e50;
    margin: 0 0 18px 0;
    letter-spacing: -0.1px;
}

.query-content ul {
    font-family: "Inter", "Segoe UI", "SF Pro Display", "Roboto", "Helvetica Neue", sans-serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.7;
    color: #2c3e50;
    margin: 0 0 18px 0;
    letter-spacing: -0.1px;
    padding-left: 20px;
}

.query-content li {
    margin-bottom: 8px;
}

.query-content li:last-child {
    margin-bottom: 0;
}

.query-content strong {
    color: #622e9d;
    font-weight: 600;
}

.query-content p:last-child {
    margin-bottom: 0;
}

.alignment-radio label {
    margin-right: 15px;
    font-weight: 500;
    color: #301279;
    cursor: pointer;
    transition: color 0.2s ease;
}

.alignment-radio label:hover {
    color: #622e9d;
}

.alignment-radio input[type="radio"] {
    margin-right: 8px;
    accent-color: #EDAE49;
}

.app-controls-block-dropdown,
.control-slider {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

#bar-height-slider {
    width: 100% !important;
    max-width: 100% !important;
    margin: 15px 0 !important;
    padding: 0 10px 10px 10px !important;
    box-sizing: border-box !important;
}

#clustergram-height-slider {
    width: 100% !important;
    max-width: 100% !important;
    margin: 15px 0 !important;
    padding: 0 10px 10px 10px !important;
    box-sizing: border-box !important;
}

.Select-control {
    border: 2px solid #e1e5e9 !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
    transition: all 0.3s ease !important;
    background: white !important;
    font-size: 15px !important;
}

.Select-control:hover {
    border-color: #EDAE49 !important;
    box-shadow: 0 2px 8px rgba(237, 174, 73, 0.15) !important;
}

.Select--is-focused .Select-control {
    border-color: #301279 !important;
    box-shadow: 0 0 0 3px rgba(48, 18, 121, 0.1) !important;
}

.Select-placeholder {
    color: #506784 !important;
    font-style: italic !important;
    font-size: 15px !important;
}

.Select-menu-outer {
    border: 2px solid #EDAE49 !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15) !important;
    z-index: 10000 !important;
    font-size: 15px !important;
}

/* Ensure all Dash dropdown menus are above other content */
.Select-menu,
.Select--is-open .Select-menu-outer,
.app-controls-block-dropdown .Select-menu-outer {
    z-index: 10000 !important;
}

/* Cascading z-index for Custom tab dropdowns so that top dropdown has highest priority - fixes overlap issues! */
#overview-dropdown,
#overview-dropdown .Select,
#overview-dropdown .Select-control,
#overview-dropdown .Select-menu-outer,
#overview-dropdown .Select-menu {
    z-index: 10400 !important;
    position: relative !important;
}

#colorscale-dropdown,
#colorscale-dropdown .Select,
#colorscale-dropdown .Select-control,
#colorscale-dropdown .Select-menu-outer,
#colorscale-dropdown .Select-menu {
    z-index: 10300 !important;
    position: relative !important;
}

#distance-metric-dropdown,
#distance-metric-dropdown .Select,
#distance-metric-dropdown .Select-control,
#distance-metric-dropdown .Select-menu-outer,
#distance-metric-dropdown .Select-menu {
    z-index: 10200 !important;
    position: relative !important;
}

#linkage-method-dropdown,
#linkage-method-dropdown .Select,
#linkage-method-dropdown .Select-control,
#linkage-method-dropdown .Select-menu-outer,
#linkage-method-dropdown .Select-menu {
    z-index: 10100 !important;
    position: relative !important;
}

#tissue-abundance-dropdown,
#tissue-abundance-dropdown .Select,
#tissue-abundance-dropdown .Select-control,
#tissue-abundance-dropdown .Select-menu-outer,
#tissue-abundance-dropdown .Select-menu {
    z-index: 10050 !important;
    position: relative !important;
}

#organ-abundance-dropdown,
#organ-abundance-dropdown .Select,
#organ-abundance-dropdown .Select-control,
#organ-abundance-dropdown .Select-menu-outer,
#organ-abundance-dropdown .Select-menu {
    z-index: 10040 !important;
    position: relative !important;
}

#tissue-dropdown-container .app-controls-block {
    border-left: 4px solid #622e9d;
}

#organ-dropdown-container .app-controls-block {
    border-left: 4px solid #622e9d;
}

#structure-plot-colorscale-container .app-controls-block {
    border-left: 4px solid #EDAE49;
}

#structure-plot-colorscale-dropdown,
#structure-plot-colorscale-dropdown .Select,
#structure-plot-colorscale-dropdown .Select-control,
#structure-plot-colorscale-dropdown .Select-menu-outer,
#structure-plot-colorscale-dropdown .Select-menu {
    z-index: 10030 !important;
    position: relative !important;
}

.Select-option {
    transition: all 0.2s ease !important;
    font-size: 15px !important;
}

.Select-option:hover {
    background-color: #f8f9fa !important;
    color: #301279 !important;
    font-size: 15px !important;
}

.Select-option.is-selected {
    background-color: #301279 !important;
    color: white !important;
    font-size: 15px !important;
}

.Select-option.is-focused {
    background-color: #EDAE49 !important;
    color: #301279 !important;
    font-size: 15px !important;
}

.Select-menu {
    font-size: 15px !important;
}

.app-controls-block .daq-ToggleSwitch {
    margin-bottom: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 8px;
    padding: 12px;
    border: 1px solid #e1e5e9;
    transition: all 0.3s ease;
}

.app-controls-block .daq-ToggleSwitch:hover {
    border-color: #EDAE49;
    box-shadow: 0 2px 8px rgba(237, 174, 73, 0.15);
}

.app-controls-block .daq-ToggleSwitch:last-child {
    margin-bottom: 0;
}

.rc-slider {
    margin: 15px 0 !important;
}

.rc-slider-track {
    background: linear-gradient(90deg, #301279 0%, #622e9d 100%) !important;
    height: 6px !important;
}

.rc-slider-handle {
    border: 3px solid #EDAE49 !important;
    background: white !important;
    width: 18px !important;
    height: 18px !important;
    margin-top: -6px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    transition: all 0.3s ease !important;
}

.rc-slider-handle:hover {
    border-color: #f2c668 !important;
    transform: scale(1.1) !important;
}

.rc-slider-handle:focus {
    border-color: #301279 !important;
    box-shadow: 0 0 0 3px rgba(48, 18, 121, 0.1) !important;
}

.rc-slider-rail {
    background: #e1e5e9 !important;
    height: 6px !important;
}

.dash-tab {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
    border: 1px solid #e1e5e9 !important;
    border-bottom: none !important;
    padding: 14px 28px !important;
    margin: 0 4px !important;
    font-family: "Inter", "Segoe UI", "SF Pro Display", "Roboto", "Helvetica Neue", sans-serif !important;
    font-weight: 500 !important;
    font-size: 13px !important;
    letter-spacing: 0.3px !important;
    color: #506784 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-radius: 8px 8px 0 0 !important;
    text-transform: uppercase !important;
    position: relative !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
    cursor: pointer !important;
    min-width: 80px !important;
    text-align: center !important;
}

.dash-tab:hover {
    background: linear-gradient(135deg, #EDAE49 0%, #f2c668 100%) !important;
    color: #301279 !important;
    border-color: #EDAE49 !important;
    box-shadow: 0 4px 12px rgba(237, 174, 73, 0.3) !important;
    transform: translateY(-1px) !important;
}

.dash-tab--selected {
    background: linear-gradient(135deg, #301279 0%, #622e9d 100%) !important;
    color: white !important;
    border-color: #301279 !important;
    font-weight: 600 !important;
    box-shadow: 0 6px 20px rgba(48, 18, 121, 0.25) !important;
    transform: translateY(-2px) !important;
    z-index: 10 !important;
}

.dash-tab--selected::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, #EDAE49 0%, #f2c668 100%);
    border-radius: 2px 2px 0 0;
}

div[data-value="tab-1"],
div[data-value="tab-2"],
div[data-value="tab-3"] {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
    border: 1px solid #e1e5e9 !important;
    border-bottom: none !important;
    padding: 14px 28px !important;
    margin: 0 4px !important;
    font-family: "Inter", "Segoe UI", "SF Pro Display", "Roboto", "Helvetica Neue", sans-serif !important;
    font-weight: 500 !important;
    font-size: 17px !important;
    letter-spacing: 0.3px !important;
    color: #506784 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-radius: 8px 8px 0 0 !important;
    text-transform: uppercase !important;
    position: relative !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
    cursor: pointer !important;
    min-width: 80px !important;
    text-align: center !important;
}

div[data-value="tab-1"]:hover,
div[data-value="tab-2"]:hover,
div[data-value="tab-3"]:hover {
    background: linear-gradient(135deg, #EDAE49 0%, #f2c668 100%) !important;
    color: #301279 !important;
    border-color: #EDAE49 !important;
    box-shadow: 0 4px 12px rgba(237, 174, 73, 0.3) !important;
    transform: translateY(-1px) !important;
}

.dash-tabs {
    background: transparent !important;
    border-bottom: 2px solid #e1e5e9 !important;
    margin-bottom: 0 !important;
    padding: 0 10px !important;
    display: flex !important;
    align-items: flex-end !important;
    font-size: 17px !important;
}

.dash-tabs * {
    font-size: 17px !important;
}

#tabs div[data-value="tab-1"],
#tabs div[data-value="tab-2"],
#tabs div[data-value="tab-3"] {
    font-size: 17px !important;
}

/* Ensure tab label text is sized correctly */
.tabs-full-height > div > div {
    font-size: 17px !important;
}

.tabs-full-height > div > div > div {
    font-size: 17px !important;
}

.tabs-full-height {
    font-size: 17px !important;
}

/* ######################################################################################
   # Panel graph content and layout
   ###################################################################################### */

.graph-wrapper {
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    padding: 2px;
    box-sizing: border-box;
    gap: 0px;
}

.barplot-container,
.atse-container {
    flex: 0 0 auto;
    height: 540px;
    min-height: 500px;
    max-height: 600px;
    overflow: visible;
    margin-bottom: 2px;
    transition: height 0.3s ease, min-height 0.3s ease, max-height 0.3s ease;
}

.table-container {
    flex: 0 0 auto;
    min-height: auto;
    height: auto;
    overflow: visible;
    margin-top: 20px;
    border-top: none !important;
    display: block;
    visibility: visible;
}


/* ######################################################################################
   # Clustergram / heatmap components
   ###################################################################################### */

.clustergram-container {
    width: 100%;
    height: 100%;
    overflow: visible !important;
}

.clustergram-container .js-plotly-plot,
.heatmap-container .dash-bio-clustergram,
.heatmap-container .js-plotly-plot,
.plotly-graph-div {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
}

.dash-bio-clustergram {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
}

.dash-bio-clustergram svg {
    width: 100% !important;
    max-width: none !important;
}

.heatmap-container .dash-bio-clustergram {
    transform-origin: left center !important;
}

.heatmap-container .plotly-graph-div .annotations {
    position: relative !important;
}

.clustergram-container text {
    font-size: 10px !important;
}

.heatmap-container {
    width: 100%;
    height: 710px;
    min-height: 680px;
    flex: 0 0 auto;
    transition: all 0.3s ease;
    overflow: visible !important;
    position: relative;
    display: flex;
    flex-direction: column;
    margin-top: 0px;
    margin-bottom: 8px;
    overflow-x: auto !important;
}

/* Axis ticks in clustergrams/heatmaps */
.heatmap-container .xtick text {
    font-size: 9px !important;
}
.heatmap-container .ytick text {
    font-size: 10px !important;
}

/* Clustergram/heatmap legends & organ annotation */
.clustergram-legend {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px;
}
.organ-legend {
    position: absolute;
    right: 10px;
    top: 20%;
    background: rgba(255, 255, 255, 0.9);
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 12px;
}
.organ-annotation {
    font-size: 10px;
    font-weight: bold;
}

/* Horizontal & vertical scrollbars for clustergrams to temporarily bypass overflow issues */
.scroll-x-wrapper {
    width: 100%;
    overflow-x: auto !important;
}

.scroll-x-wrapper > .js-plotly-plot,
.scroll-x-wrapper > .dash-bio-clustergram,
.scroll-x-wrapper > .plotly-graph-div {
    min-width: 100% !important; 
}


/* ######################################################################################
   # Table + Table Header Controls
   ###################################################################################### */

.table-header-controls .btn {
    border-top: none !important;
    box-shadow: none !important;
}
.table-header-controls {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    justify-content: flex-start;
    margin-bottom: 2px;
    border-top: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
}
.table-header-controls::before,
.table-header-controls::after {
    display: none !important;
}
.clear-filters-btn {
    background-color: #EDAE49 !important;
    border-color: #EDAE49 !important;
    color: #301279 !important;
    border-radius: 15px;
    padding: 4px 12px;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    min-width: 100px;
    margin-bottom: 0;
    border-top: none !important;
    box-shadow: none !important;
}
.clear-filters-btn:hover:not(:disabled) {
    background-color: #D49A2B !important;
    border-color: #D49A2B !important;
    transform: translateY(-1px);
}
.clear-filters-btn:active:not(:disabled) {
    background-color: #8f6214 !important;
    border-color: #8f6214 !important;
    transform: translateY(0);
}
.clear-filters-btn:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(237, 174, 73, 0.25) !important;
}
.clear-filters-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #e9ecef !important;
    border-color: #dee2e6 !important;
    color: #6c757d !important;
}
.btn-clear {
    background-color: #6c757d;
    color: white;
    border-radius: 15px;
    padding: 4px 12px;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}
.btn-clear:hover {
    background-color: #5a6268;
    transform: translateY(-1px);
}
.btn-clear:active {
    transform: translateY(0);
}
.btn-clear i {
    margin-right: 5px;
}

.table-container-fixed {
    max-height: none;
    overflow: visible;
    position: relative;
    width: 100%;
    height: auto;
}

/* ---------- Dash DataTable stylizations ---------- */
.dash-table-container {
    overflow-x: auto !important;
    overflow-y: visible !important;
    width: 100% !important;
    height: auto !important;
    border-top: none !important;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.dash-table-container .dash-spreadsheet-container {
    overflow-x: auto !important;
    overflow-y: visible !important;
    max-width: 100% !important;
    height: auto !important;
    border-top: none !important;
    border-radius: 6px;
}
.dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner table {
    width: auto !important;
    min-width: 100% !important;
    border-top: none !important;
    border-collapse: separate;
    border-spacing: 0;
    height: auto !important;
}

.dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner {
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
}

#left_data_table,
#right_data_table {
    height: auto !important;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0px 0px 10px rgba(0,0,0,0.1);
    padding: 0px;
    overflow: visible !important;
}

#left_data_table .dash-table-container,
#right_data_table .dash-table-container {
    height: auto !important;
    overflow: visible !important;
    max-height: none !important;
    min-height: 500px !important;
}

#left_data_table .dash-spreadsheet-container,
#right_data_table .dash-spreadsheet-container {
    height: auto !important;
    overflow: visible !important;
    max-height: none !important;
}

#left_data_table .dash-spreadsheet-inner,
#right_data_table .dash-spreadsheet-inner {
    height: auto !important;
    overflow: visible !important;
    max-height: none !important;
}

#left_data_table .dash-table-pagination,
#right_data_table .dash-table-pagination {
    display: flex !important;
    justify-content: flex-end !important;
    margin-top: 15px !important;
    margin-bottom: 20px !important;
    padding: 10px 0 !important;
    visibility: visible !important;
    height: auto !important;
    background-color: white !important;
    text-align: right !important;
}

.dash-table-container .previous-next-container {
    display: flex !important;
    visibility: visible !important;
}

.dash-table-container .current-page {
    display: inline-block !important;
    visibility: visible !important;
}

.tables-section {
    display: flex;
    gap: 20px;
    padding: 0px 20px 90px 20px;
    width: 100%;
    box-sizing: border-box;
    flex: 1;
    min-height: 800px;
    margin-top: -45px;
}

.table-container {
    flex: 1;
    background-color: transparent;
    padding: 0px;
    border-radius: 0px;
    box-shadow: none;
    height: auto !important;
    max-height: none !important;
    overflow-y: hidden !important;
    overflow-x: hidden !important;
    color: #1C1C2C;
    position: relative;
}

/* Filter error popups */
.filter-error-popup {
    position: absolute;
    top: 40px;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: #ffe6e6;
    border: 2px solid #ff4444;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(255, 68, 68, 0.3);
    animation: errorSlideDown 0.3s ease-out;
}

@keyframes errorSlideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.error-message {
    color: #d32f2f;
    font-size: 13px;
    font-family: "Open Sans", sans-serif;
    margin-bottom: 8px;
    line-height: 1.4;
}

.error-message:last-child {
    margin-bottom: 0;
}

.error-message strong {
    color: #b71c1c;
    font-weight: 600;
}

.dash-table-container .dash-header {
    background: linear-gradient(135deg, #301279 0%, #622e9d 100%) !important;
    color: white !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    font-size: 13px !important;
    height: 40px !important;
    padding: 12px 8px !important;
    line-height: 16px !important;
    box-sizing: border-box !important;
}

#left_data_table .dash-table-container .dash-header,
#right_data_table .dash-table-container .dash-header {
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    padding: 12px 8px !important;
    line-height: 16px !important;
    box-sizing: border-box !important;
}

.dash-table-container .dash-cell {
    border-right: 1px solid #e1e5e9 !important;
    border-bottom: 1px solid #e1e5e9 !important;
    transition: background-color 0.2s ease !important;
}

.dash-table-container .dash-cell:hover {
    background-color: #f1f3f4 !important;
}

.dash-table-container .dash-filter {
    background: linear-gradient(135deg, #622e9d 0%, #8b5bb4 100%) !important;
    border: none !important;
}

.dash-table-container .dash-filter input {
    background: rgba(255,255,255,0.9) !important;
    border: 1px solid rgba(255,255,255,0.3) !important;
    border-radius: 4px !important;
    color: #1C1C2C !important;
    font-size: 12px !important;
    padding: 6px 8px !important;
}

.dash-table-container .dash-filter input:focus {
    background: white !important;
    border-color: #EDAE49 !important;
    box-shadow: 0 0 0 2px rgba(237, 174, 73, 0.2) !important;
}

/* ######################################################################################
   # Query instructions/info, binders, miscellaneous UX blocks
   ###################################################################################### */

.query-instructions {
    background-color: #f8f9fa;
    border-left: 4px solid #0C4142;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}
.query-instructions-title { margin-top: 0; color: #0C4142; }
.query-note { font-style: italic; margin-top: 15px; }

.binder-tabs-container {
    display: flex;
    margin-left: auto;
    margin-right: 30px;
    height: 100%;
    align-items: flex-end;
}
.binder-tab {
    padding: 8px 20px;
    margin-right: 5px;
    background-color: #0a7f8c;
    color: white;
    border-radius: 5px 5px 0 0;
    font-weight: bold;
    height: 70%;
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: background-color 0.3s;
}
.binder-tab:hover {
    background-color: #622e9d;
}
.binder-tab-active {
    background-color: #622e9d;
    height: 80%;
}

/* ######################################################################################
   # Plotly figure utilities, loading states
   ###################################################################################### */
.atse-container .js-plotly-plot,
.plotly-graph-div {
    height: 100% !important;
    width: 100% !important;
    overflow: visible !important;
}
.plotly-graph-div { overflow: visible !important; }

[data-dash-is-loading="true"] + .custom-loading-message {
    display: block !important;
}
.custom-loading-message {
    display: none;
    margin-top: 8px;
    text-align: center;
    font-size: 14px;
    color: #506784;
    font-family: "Open Sans", sans-serif;
    font-weight: 500;
}

.show-hide { display: none !important; }

/* ######################################################################################
   # Full panel (Clustergram/Event) expansion for maximized view
   ###################################################################################### */

.full-panel-event .barplot-container,
.full-panel-event .atse-container,
.full-panel-clustergram .heatmap-container {
    height: calc(100vh - 150px) !important;
    max-height: none !important;
    flex: 1 1 auto !important;
}
.full-panel-event .graph-wrapper,
.full-panel-clustergram .graph-wrapper {
    height: 100% !important;
    max-height: none !important;
}
.full-panel-event .js-plotly-plot,
.full-panel-clustergram .js-plotly-plot {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    overflow: visible !important;
}
.full-panel-clustergram .heatmap-container .dash-bio-clustergram,
.full-panel-clustergram .heatmap-container .plotly-graph-div {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    overflow: visible !important;
}
.panel.full-panel-event,
.panel.full-panel-clustergram {
    height: calc(100vh - 100px) !important;
    max-height: none !important;
}

@media (max-width: 1200px) {
    .app-body {
        flex-direction: column;
    }
    .control-tabs {
        width: 100% !important;
        height: auto;
        max-height: 40vh;
    }
    .panels-container {
        height: auto;
    }
    .barplot-container,
    .atse-container {
        height: 300px;
    }
    .tables-section {
        flex-direction: column;
        gap: 15px;
    }
    .full-panel-event .barplot-container,
    .full-panel-event .atse-container,
    .full-panel-clustergram .heatmap-container {
        height: calc(100vh - 200px) !important;
    }
    .panel.full-panel-event,
    .panel.full-panel-clustergram {
        height: calc(100vh - 120px) !important;
    }
}

@media (max-width: 768px) {
    .panels-container {
        flex-direction: column;
    }
    .panel {
        margin-bottom: 0px;
    }
    .barplot-container,
    .atse-container {
        height: 350px;
        flex: 0 0 auto;
    }
    .heatmap-container {
        height: 450px;
        flex: 0 0 auto;
    }
    .tables-section {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
    }
    .full-panel-event .barplot-container,
    .full-panel-event .atse-container,
    .full-panel-clustergram .heatmap-container {
        height: calc(100vh - 250px) !important;
    }
    .panel.full-panel-event,
    .panel.full-panel-clustergram {
        height: calc(100vh - 150px) !important;
    }
}

/* ######################################################################################
   # Color Picker Styling - Remove borders and make full width
   ###################################################################################### */
.daq-ColorPicker {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
}

.app-controls-block .daq-ColorPicker {
    margin: 10px 0 !important;
    padding: 0 !important;
}

#exon-color-picker .daq-colorpicker--light__chromepicker {
    border-radius: 0% !important;
    border: none !important;
}

#junction-color-picker .daq-colorpicker--light__chromepicker {
    border-radius: 0% !important;
    border: none !important;
}

#junction-individual-color-picker .daq-colorpicker--light__chromepicker {
    border-radius: 0% !important;
    border: none !important;
}

#transcript-individual-color-picker .daq-colorpicker--light__chromepicker {
    border-radius: 0% !important;
    border: none !important;
}

/* ######################################################################################
   # Isoform Hash Lookup Styling
   ###################################################################################### */

.hash-lookup-content {
    margin-top: 15px;
    padding: 25px;
    background: linear-gradient(135deg, #fafbfc 0%, #ffffff 100%);
    border-radius: 12px;
    border: 1px solid rgba(225, 229, 233, 0.6);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.hash-lookup-content p {
    font-family: "Inter", "Segoe UI", "SF Pro Display", "Roboto", "Helvetica Neue", sans-serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.7;
    color: #2c3e50;
    margin: 0 0 18px 0;
    letter-spacing: -0.1px;
}

.hash-lookup-content p:last-child {
    margin-bottom: 0;
}

.coordinate-mode-selector {
    margin: 15px 0 20px 0;
    padding: 0;
}

.coordinate-radio-items {
    margin-top: 8px;
}

.coordinate-radio-items label {
    margin-right: 20px;
    font-size: 14px;
    color: #495057;
    white-space: pre-line;
}

.coordinate-input-group {
    margin: 15px 0;
    display: flex;
    flex-direction: column;
}

.coordinate-section-label {
    color: #301279;
    font-family: "Open Sans", sans-serif;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
    display: block;
}

.coordinate-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.coordinate-input:focus {
    outline: none;
    border-color: #301279;
    box-shadow: 0 0 0 2px rgba(48, 18, 121, 0.2);
}

.hash-output {
    margin: 20px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    min-height: 80px;
}

.hash-result-container {
    margin-top: 15px;
}

.hash-result-label {
    color: #301279;
    font-family: "Open Sans", sans-serif;
    font-size: 14px;
    font-weight: 600;
    margin-top: 18px;
    margin-bottom: 8px;
}

.hash-result-box {
    background-color: #ffffff;
    border: 2px solid #301279;
    border-radius: 6px;
    padding: 12px 15px;
    font-family: "Consolas", "Monaco", "Courier New", monospace;
    font-size: 14px;
    font-weight: 500;
    color: #301279;
    word-break: break-all;
    user-select: all;
    cursor: text;
    line-height: 1.4;
}

.hash-result-box:hover {
    background-color: #f8f9ff;
    border-color: #252066;
}

.hash-result-with-copy {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hash-result-with-copy .hash-result-box {
    flex: 1;
}

.hash-copy-button {
    background-color: #301279;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: background-color 0.3s;
    white-space: nowrap;
}

.hash-copy-button:hover {
    background-color: #252066;
}

.hash-copy-button:active {
    background-color: #1e1a55;
}

/* Style the clipboard icon */
.hash-copy-button svg {
    width: 14px;
    height: 14px;
}

.hash-placeholder {
    color: #6c757d;
    font-style: italic;
    margin: 0;
}

.upload-status {
    margin: 10px 0;
    padding: 10px;
    border-radius: 4px;
}

.control-button {
    background-color: #301279;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.control-button:hover {
    background-color: #252066;
}

.control-button:active {
    background-color: #1e1a55;
}

/* GTF Upload Styling */
#gtf-upload {
    width: 100%;
    height: 70px;
    border: 2px dashed #cccccc;
    border-radius: 8px;
    background-color: #fafbfc;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px 0;
    transition: all 0.3s ease;
    cursor: pointer;
}

#gtf-upload:hover {
    border-color: #301279;
    background-color: #f8f9ff;
}

#gtf-upload div {
    font-family: "Open Sans", sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #495057;
    text-align: center;
    line-height: 1.4;
}

#gtf-upload a {
    color: #301279;
    text-decoration: none;
    font-weight: 600;
}

#gtf-upload a:hover {
    text-decoration: underline;
}

/* ######################################################################################
   # Refactored styles from app.py - Layout and containers
   ###################################################################################### */

/* Main application layout */
.app-layout {
    height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
}

/* Panels wrapper */
.panels-wrapper {
    display: flex;
    flex-direction: column;
}

/* Top panel container */
.top-panel-container {
    width: 100%;
    margin-bottom: 10px;
}

/* Control tabs container */
.control-tabs-container {
    width: 340px;
    background-color: white;
    border-right: 1px solid #e1e1e1;
}

/* Tabs with full height */
.tabs-full-height {
    height: 100%;
}

/* Download section */
.gtf-download-section {
    display: none;
}

.gtf-download-section.visible {
    display: block;
}

.gtf-download-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ######################################################################################
   # Control panel styles
   ###################################################################################### */

/* Color picker containers */
.color-picker-container {
    border: none;
    outline: none;
    box-shadow: none;
}

/* Toggle switch containers */
.toggle-switch-container {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.toggle-switch-inline {
    display: inline-block;
}

.hide-junctions-toggle-label {
    display: inline-block;
    margin-right: 75px;
}

.isoform-unit-toggle-label {
    display: inline-block;
    margin-right: 15px;
}

.sample-averaging-toggle-label {
    display: inline-block;
    margin-right: 15px;
}

.tissue-labels-toggle-label {
    display: inline-block;
    margin-right: 55px;
}

.celltype-labels-toggle-label {
    display: inline-block;
    margin-right: 30px;
}

.radio-items-inline {
    display: inline-block;
    font-size: 12px;
    margin-left: -10px;
}

/* ######################################################################################
   # Plot and graph containers
   ###################################################################################### */

/* Top structure plot container */
.top-structure-plot-container {
    height: 100%;
    margin-bottom: 15px;
}

/* Transcript structure plot container */
.top-transcript-structure-plot-hidden {
    display: none;
}

/* Graph containers with full dimensions */
.graph-full-size {
    height: 100%;
    width: 100%;
    min-height: 0;
    flex: 1;
}

.progress-graph {
    width: 100%;
    height: 100%;
}

/* Heatmap containers */
.heatmap-full-size {
    width: 100%;
    height: 100%;
}

/* ######################################################################################
   # Error and status styles
   ###################################################################################### */

/* Filter error popups */
.filter-error-popup-hidden {
    display: none;
}

/* Summary multiline styling */
.summary-multiline-item {
    margin: 0;
    padding: 0;
    line-height: 1.4;
}

/* Error messages */
.error-message {
    color: red;
    font-weight: bold;
}

.error-message-with-padding {
    color: red;
    font-weight: bold;
    padding-top: 10px;
}

/* Success messages */
.success-message {
    color: green;
}

.success-message-bold {
    color: green;
    font-weight: bold;
}

/* Warning messages */
.warning-message {
    color: orange;
}

/* ######################################################################################
   # Dynamic container styles (for callbacks)
   ###################################################################################### */

/* Panel styles that are dynamically set by callbacks */
.panel-dynamic-height {
    height: 760px;
    min-height: 760px;
}

/* Top panel container styles */
.top-panel-container-auto {
    height: auto;
    min-height: 200px;
    margin-bottom: 15px;
}

.top-panel-container-fallback {
    height: 100%;
    min-height: 400px;
    margin-bottom: 15px;
}

/* Top panel body styles */
.top-panel-body-minimal {
    width: 100%;
    background-color: white;
    padding: 15px 15px 30px 15px;
    border-radius: 0;
    min-height: auto;
    height: auto;
    color: #1C1C2C;
    transition: height 0.3s ease, min-height 0.3s ease;
    box-sizing: border-box;
}

.top-panel-body-fallback {
    width: 100%;
    background-color: white;
    padding: 15px 15px 165px 15px;
    border-radius: 0;
    min-height: 450px;
    height: auto;
    color: #1C1C2C;
    transition: height 0.3s ease, min-height 0.3s ease;
    box-sizing: border-box;
}

/* Plot container toggle styles */
.plot-container-hidden {
    display: none;
}

.plot-container-visible {
    display: block;
    height: auto;
    min-height: auto;
    max-height: none;
    margin-bottom: 15px;
}

/* Additional CSS classes for inline style refactoring */
.download-buttons-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toggle-switch-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.toggle-switch-label-wide {
    display: inline-block;
    margin-right: 75px;
}

.toggle-switch-label-narrow {
    display: inline-block;
    margin-right: 15px;
}

.toggle-switch-label-medium {
    display: inline-block;
    margin-right: 55px;
}

.toggle-switch-label-narrow-plus {
    display: inline-block;
    margin-right: 30px;
}

.radio-items-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.radio-items-label {
    display: inline-block;
    margin-right: 15px;
}

.radio-items-inline {
    display: inline-block;
    font-size: 12px;
    margin-left: -10px;
}

.radio-items-inline label {
    display: inline-block;
    margin-right: 5px;
}

.radio-items-vertical {
    display: flex;
    flex-direction: column;
    font-size: 12px;
    margin-left: -10px;
}

.radio-items-vertical label {
    display: block;
}

.plot-container-full-height {
    width: 100%;
    height: 100%;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

.summary-line {
    margin: 0;
    padding: 0;
    line-height: 1.4;
}

.error-message-spaced {
    padding-top: 10px;
}

.error-message-light {
    color: red;
}


/* CRUCIAL FIXES TO PREVENT LOADING SCREEN OVERLAY INTERACTION ISSUES WITH ISOFORM MASTER TABLE*/
/* When loading is complete, allow clicks to pass through the overlay after fade completes */
#loading-overlay.hidden {
    z-index: 0 !important;
}

/* Safe fallback: ensure constellation and decorative layers do not capture user click events */
.constellation, .transcript-star {
    pointer-events: none !important;
    z-index: 0 !important;
}

/* ######################################################################################
   # Individual Junction Color Picker Popup Styling
   ###################################################################################### */

#junction-color-picker-popup {
    position: fixed;
    z-index: 10000;
    background-color: #ffffff;
    border: 2px solid #EDAE49;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 8px 24px rgba(90, 42, 145, 0.4);
    display: none;
    width: 280px;
}

.junction-header-container {
    margin-bottom: 10px;
}

.junction-color-title {
    font-size: 16px;
    font-weight: 600;
    color: #622e9d;
    font-family: "Inter", "Segoe UI", "SF Pro Display", "Roboto", "Helvetica Neue", sans-serif;
    letter-spacing: -0.3px;
    text-transform: uppercase;
}

.junction-color-bar {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, #EDAE49 0%, #f2c668 100%);
    border-radius: 1px;
    margin: 5px 0;
}

#junction-id-display {
    font-size: 11px;
    font-weight: 600;
    color: #506784;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: "Inter", "Segoe UI", "SF Pro Display", "Roboto", "Helvetica Neue", sans-serif;
    word-break: break-word;
    margin-bottom: 4px;
}

.junction-color-picker-container {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.junction-color-buttons-container {
    display: flex;
    gap: 8px;
}

.junction-color-btn {
    flex: 1;
    padding: 6px 12px;
    font-size: 0.85rem;
}
