
/* ===== PDB Explorer Version 2.0 — Result Dashboard ===== */

#site_content {
    max-width: 1500px;
    margin: 28px auto;
    padding: 30px;
    background: rgba(255,255,255,.94);
    border: 1px solid #c6e4f8;
    border-radius: 22px;
    box-shadow: 0 12px 35px rgba(18,91,151,.12);
    font-size: 16px;
    color: #243e5c;
}

#site_content .result_info {
    background: linear-gradient(110deg,#0758bd,#087bd5);
    color: #fff;
    border-radius: 12px;
    padding: 17px 22px;
    margin-bottom: 18px;
    font-size: 23px;
    text-align: left;
}

#TITLE_info {
    background: #eaf5ff;
    border: 1px solid #c8e5fa;
    border-radius: 12px;
    padding: 12px 18px;
    margin-bottom: 22px;
}

#TITLE_info .header {
    color: #073d83;
    font-size: 22px;
    font-weight: 800;
    margin: 0;
}

#results {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 20px;
}

#results > .section {
    position: relative;
    min-width: 0;
    margin: 0;
    padding: 20px;
    background: #fff;
    border: 1px solid #d5e8f6;
    border-radius: 14px;
    box-shadow: 0 5px 18px rgba(25,83,130,.07);
}

#results > .section > .header {
    color: #0758bd;
    font-size: 19px;
    font-weight: 800;
    border-bottom: 2px solid #e0f0fc;
    padding-bottom: 12px;
    margin: 0 0 15px;
}

#results > #IMAGE_DATA_info {
    position: static;
    margin: 0;
    width: auto;
    text-align: left;
    grid-column: 1 / -1;
}

#results > #BIO_MOLECULAR_DATA_info,
#results > #CITATION_DATA_info {
    grid-column: 1 / -1;
}

#results .info {
    margin: 0;
    font-size: 15px;
    line-height: 1.7;
}

#results table {
    width: 100%;
    border-collapse: collapse;
}

#results table tr td {
    display: table-cell;
    padding: 9px 8px;
    border-bottom: 1px solid #edf3f8;
    vertical-align: top;
}

#results .info_for {
    width: 35%;
    color: #315477;
    font-weight: 700;
}

#results a {
    color: #0872c5;
    font-weight: 600;
    text-decoration: none;
}

#results a:hover {
    color: #06458d;
    text-decoration: underline;
}

#IMAGE_DATA_info #static_image {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 24px;
}

#IMAGE_DATA_info #static_image > img {
    width: 300px;
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid #d6e7f5;
}

#jmol_fullscreen_container {
    width: 100% !important;
    max-width: 100%;
    height: 560px !important;
    padding: 12px;
    border-radius: 14px;
    background: #071b32 !important;
    box-sizing: border-box;
}

#jmol_container {
    width: 100% !important;
    height: 490px !important;
    background: #071b32 !important;
}

#jmol_fullscreen_container button {
    border: 1px solid #55b9ed;
    border-radius: 7px;
    background: #087bd5;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

#tool_bar {
    border: 1px solid #c9e2f5;
    border-radius: 10px;
    padding: 15px;
    background: #f5faff;
}

#tool_bar .title {
    background: transparent;
    color: #073d83;
    font-size: 18px;
}

#tool_bar ul {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 0 0;
}

#tool_bar ul li {
    list-style: none;
    margin: 0;
}

#tool_bar ul li a {
    display: inline-block;
    padding: 9px 15px;
    border-radius: 7px;
    background: #0872c5;
    color: white;
}

#enzyme_infomation {
    max-width: 100%;
    overflow: auto;
    border: 1px solid #c9e2f5;
    border-radius: 10px;
    padding: 15px;
    background: #f5faff;
    box-sizing: border-box;
}

.chain_for {
    background: #eaf5ff;
    border-radius: 8px;
    padding: 12px;
    margin: 15px 0;
    color: #073d83;
    font-size: 17px;
}

.chain {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid #e0ebf5;
    border-radius: 8px;
    background: #fbfdff;
}

.chain_id {
    width: 110px;
    float: none;
    color: #0758bd;
    font-weight: 700;
}

.chain_seq {
    flex: 1;
    min-width: 0;
    width: auto;
    overflow-wrap: anywhere;
    font-family: monospace;
    line-height: 1.8;
}

.each_ref {
    padding: 12px;
    margin-bottom: 10px;
    background: #f7fbff;
    border: 1px solid #e0ebf5;
    border-radius: 8px;
}

#upload_form_div {
    margin: 0 0 22px;
    padding: 18px;
    background: #f4faff;
    border: 1px solid #d2e8f8;
    border-radius: 12px;
}

#upload_form_div .header {
    color: #073d83;
    font-weight: 800;
}

@media (max-width: 800px) {
    #site_content {
        margin: 15px;
        padding: 18px;
    }

    #results {
        grid-template-columns: 1fr;
    }

    #results > #IMAGE_DATA_info,
    #results > #BIO_MOLECULAR_DATA_info,
    #results > #CITATION_DATA_info {
        grid-column: auto;
    }

    #jmol_fullscreen_container {
        height: 430px !important;
    }

    #jmol_container {
        height: 360px !important;
    }
}

@media (max-width: 500px) {
    #site_content {
        margin: 8px;
        padding: 12px;
    }

    #results > .section {
        padding: 14px;
    }

    #jmol_fullscreen_container {
        height: 350px !important;
    }

    #jmol_container {
        height: 280px !important;
    }
}


/* Compact header for the result page only */
#header {
    min-height: 80px !important;
    padding: 6px 4% !important;
}

.home-branding {
    min-height: 68px !important;
    gap: 18px !important;
}

.home-branding .pdb-logo {
    width: 260px !important;
    max-height: 72px !important;
}

.home-branding .eminent-logo {
    width: 220px !important;
    max-height: 72px !important;
}

@media (max-width: 600px) {
    #header {
        min-height: 65px !important;
        padding: 5px 12px !important;
    }

    .home-branding .pdb-logo {
        width: 48% !important;
        max-height: 58px !important;
    }

    .home-branding .eminent-logo {
        width: 42% !important;
        max-height: 58px !important;
    }
}

/* Remove legacy logo background on result page */
#header {
    background: linear-gradient(110deg, #eaf7ff, #ffffff 52%, #e8f7ff) !important;
}

/* ===== Result page layout corrections ===== */

* {
    box-sizing: border-box;
}

#layout {
    width: 100% !important;
    max-width: 1500px;
    margin: 0 auto !important;
}

#header {
    width: 100% !important;
    min-height: 78px !important;
    padding: 5px 25px !important;
}

.home-branding {
    width: 100%;
    max-width: 1320px;
    min-height: 65px !important;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.home-branding .pdb-logo {
    width: 250px !important;
    max-height: 65px !important;
    object-fit: contain;
}

.home-branding .eminent-logo {
    width: 220px !important;
    max-height: 65px !important;
    object-fit: contain;
}

/* Full-width blue navigation */
#menu {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 20px !important;
    background: linear-gradient(90deg, #062d62, #0754a0, #06366f) !important;
    border-bottom: 3px solid #25c7ed;
}

#menu ul {
    display: flex !important;
    justify-content: center !important;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    max-width: 1320px;
    margin: 0 auto !important;
    padding: 8px 0 !important;
    list-style: none !important;
}

#menu ul li {
    float: none !important;
    margin: 0 !important;
}

#menu ul li a,
#menu ul li a:visited {
    display: block;
    padding: 11px 18px;
    color: #ffffff !important;
    background: transparent !important;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

#menu ul li a:hover {
    background: rgba(255,255,255,.16) !important;
}

/* Main result workspace */
#site_content {
    width: calc(100% - 48px) !important;
    max-width: 1320px !important;
    margin: 18px auto !important;
    padding: 24px !important;
    overflow: hidden;
}

/* Remove old fixed-width metadata rules */
#results > #ORGANISM_DATA_info,
#results > #EXPRESSION_DATA_info {
    position: relative !important;
    float: none !important;
    width: auto !important;
    max-width: 100% !important;
    margin: 0 !important;
    grid-column: auto !important;
    min-width: 0;
}

/* Keep all cards inside the grid */
#results {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: stretch;
}

#results > .section {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
}

/* Full-width biological and structure sections */
#results > #IMAGE_DATA_info,
#results > #BIO_MOLECULAR_DATA_info,
#results > #CITATION_DATA_info {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* Prevent tables and long text from overflowing */
#results table {
    width: 100% !important;
    table-layout: auto;
}

#results .info {
    overflow-wrap: anywhere;
}

/* Responsive layout */
@media (max-width: 800px) {
    #site_content {
        width: calc(100% - 24px) !important;
        padding: 16px !important;
    }

    #results {
        grid-template-columns: 1fr !important;
    }

    #results > #IMAGE_DATA_info,
    #results > #BIO_MOLECULAR_DATA_info,
    #results > #CITATION_DATA_info {
        grid-column: 1 !important;
    }
}

@media (max-width: 500px) {
    .home-branding .pdb-logo {
        width: 48% !important;
    }

    .home-branding .eminent-logo {
        width: 42% !important;
    }

    #menu ul {
        gap: 2px;
    }

    #menu ul li a {
        padding: 9px 8px;
        font-size: 12px;
    }

    #site_content {
        width: calc(100% - 16px) !important;
        padding: 10px !important;
    }
}

/* Increase logo size on result page */
.home-branding {
    min-height: 88px !important;
}

.home-branding .pdb-logo {
    width: 310px !important;
    max-height: 80px !important;
}

.home-branding .eminent-logo {
    width: 270px !important;
    max-height: 80px !important;
}

@media (max-width: 600px) {
    .home-branding .pdb-logo {
        width: 48% !important;
        max-height: 65px !important;
    }

    .home-branding .eminent-logo {
        width: 42% !important;
        max-height: 65px !important;
    }
}

/* Larger branding on result page */
#header {
    min-height: 112px !important;
    padding: 8px 30px !important;
}

.home-branding {
    min-height: 96px !important;
}

.home-branding .pdb-logo {
    width: 380px !important;
    max-height: 95px !important;
}

.home-branding .eminent-logo {
    width: 330px !important;
    max-height: 95px !important;
}

@media (max-width: 600px) {
    .home-branding .pdb-logo {
        width: 48% !important;
        max-height: 70px !important;
    }

    .home-branding .eminent-logo {
        width: 42% !important;
        max-height: 70px !important;
    }
}

/* Dark blue footer for PDB Explorer result page */
#footer {
    width: 100% !important;
    max-width: 1320px !important;
    box-sizing: border-box !important;
    margin: 25px auto 0 !important;
    padding: 22px 20px !important;
    background: #082b55 !important;
    color: #ffffff !important;
    text-align: center !important;
    border-top: 3px solid #25c7ed;
    border-radius: 12px 12px 0 0;
    font-size: 14px;
    line-height: 1.8;
}

#footer a {
    color: #5ddcff !important;
    font-weight: 600;
    text-decoration: none;
}

#footer a:hover {
    color: #ffffff !important;
    text-decoration: underline;
}

/* Larger footer text */
#footer {
    font-size: 18px !important;
    line-height: 1.9 !important;
}

#footer a {
    font-size: 18px !important;
}

/* Larger footer text */
#footer {
    font-size: 18px !important;
    line-height: 1.9 !important;
}

#footer a {
    font-size: 18px !important;
}
