/* === Google Material Palette === */
:root {
    --google-blue: #1A73E8;
    --google-blue-dark: #174EA6;
    --google-blue-light: #4285F4;
    --google-purple: #9C27B0;
    --google-purple-dark: #7B1FA2;
    --google-purple-light: #E1BEE7;
    --google-grey-900: #202124;
    --google-grey-700: #5F6368;
    --google-grey-200: #E8EAED;
    --google-grey-100: #F1F3F4;
    --google-yellow: #F9AB00;
}

body {
    background-color: var(--google-grey-100);
    font-family: 'Google Sans Text', sans-serif;
}

.elev-1 {
    box-shadow: 0 1px 3px rgba(60,64,67,.15);
}

/* Header and Banner */
.header-container {
    margin-top: 40px;
    margin-bottom: 32px;
    text-align: center;
}

.header-container h1 {
    font-family: 'Google Sans', sans-serif;
    font-weight: 500;
    letter-spacing: -0.03em;
    margin: 0 0 12px;
    font-size: 40px;
    color: var(--google-blue-dark);
}

.banner {
    background: #fff;
    color: var(--google-grey-900);
    border: 1px solid var(--google-grey-200);
    box-shadow: 0 1px 3px rgba(60,64,67,.15);
    padding: 20px;
}

.banner-content h2 {
    font-family: 'Google Sans', sans-serif;
    font-weight: 600;
    font-size: 28px;
    margin: 0 0 16px;
    color: var(--google-grey-900);
}

.banner-section-title {
    font-family: 'Google Sans', sans-serif;
    font-weight: 600;
    font-size: 18px;
    color: var(--google-blue-dark);
    margin: 0 0 12px 0;
}

.banner-description {
    font-family: 'Google Sans Text', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--google-grey-700);
    margin-bottom: 12px;
}

.banner-description:last-child {
    margin-bottom: 0;
}

.banner-link {
    color: var(--google-blue-dark);
    text-decoration: none;
}

.banner-link:hover {
    text-decoration: underline;
}

.banner-note {
    font-size: 13px;
    color: var(--google-grey-600);
    text-align: right;
    margin-top: 6px;
}

.how-to-use {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 20px;
    border-left: 4px solid rgba(255, 255, 255, 0.3);
}

.how-to-use h3 {
    margin: 0 0 15px 0;
    font-size: 1.2em;
    font-weight: 500;
}

.how-to-use ol {
    margin: 0;
    padding-left: 20px;
}

.how-to-use li {
    margin-bottom: 8px;
    line-height: 1.5;
}

/* Disclaimer */
.disclaimer-container {
    margin-top: 8px;
}

.disclaimer-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #FFFBEB;
    border: none;
    border-left: 4px solid var(--google-yellow);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: 0 1px 3px rgba(60,64,67,.1);
}

.disclaimer-box p {
    margin: 0;
}

.disclaimer-box strong {
    color: #495057;
    font-weight: 600;
}

.disclaimer-icon {
    color: var(--google-yellow);
    font-size: 18px;
}

.disclaimer-text {
    color: var(--google-grey-700);
}

/* Sample Reports */
.samples-container {
    background-color: #fff;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid #e9ecef;
}

.samples-container h3 {
    font-family: 'Google Sans', sans-serif;
    font-size: 20px;
    font-weight: normal;
    margin-bottom: 6px;
}

.samples-description {
    font-size: 15px;
    margin-bottom: 20px;
    line-height: 1.6;
    color: var(--google-grey-700);
}

.samples-description strong {
    color: var(--google-blue-dark);
    font-weight: 600;
}

.sample-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    margin-top: 8px;
}
@media (max-width: 768px) {
    .sample-buttons {
        grid-template-columns: 1fr;
    }
}

/* Tip under sample buttons */
.samples-tip {
    font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    color: var(--google-grey-700);
    font-weight: 500;
    margin-top: 24px;
    line-height: 1.6;
    padding: 18px 24px;
    background: linear-gradient(135deg, #f8f9fa 0%, #f1f3f4 100%);
    border-radius: 12px;
    border: 1px solid var(--google-grey-200);
    box-shadow: 0 1px 3px rgba(60, 64, 67, 0.08);
}

.sample-button {
    background: var(--google-grey-100);
    color: var(--google-grey-900);
    border: 1px solid var(--google-grey-200);
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(60,64,67,.15), 0 1px 2px rgba(60,64,67,.1);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.sample-button-content {
    padding: 10px 14px;
    text-align: left;
}

.sample-title {
    font-weight: 500;
    font-size: 0.9em;
    margin-bottom: 4px;
    line-height: 1.3;
}

.sample-meta {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    font-size: 0.75em;
    opacity: 0.8;
}

.sample-modality {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
}

.sample-modality.mod-ct {
    background: rgba(66, 133, 244, 0.15);
    color: var(--google-blue-dark);
}

.sample-modality.mod-mri {
    background: rgba(156, 39, 176, 0.15);
    color: var(--google-purple-dark);
}

.sample-modality.mod-xr {
    background: rgba(255, 152, 0, 0.15);
    color: #e65100;
}

.sample-modality.mod-us {
    background: rgba(0, 188, 212, 0.15);
    color: #00695c;
}

.sample-modality.mod-pet {
    background: rgba(255, 64, 129, 0.15);
    color: #ad1457;
}

.sample-button:hover {
    background: var(--google-grey-200);
    border-color: var(--google-blue-light);
    box-shadow: 0 4px 12px rgba(60,64,67,.2), 0 2px 4px rgba(60,64,67,.15);
    transform: translateY(-1px);
}

.sample-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(60,64,67,.2);
}

/* Text Areas */
.text-area-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.text-area-wrapper {
    flex: 1;
}

.text-area-wrapper h2 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 1.3em;
    font-weight: 500;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 8px;
}

.large-text-area {
    width: 100%;
    height: 500px;
    padding: 15px;
    box-sizing: border-box;
    resize: vertical;
    border: 1px solid var(--google-grey-200);
    border-radius: 8px;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 14px;
    line-height: 1.5;
    transition: border-color 0.3s ease;
}

.large-text-area:focus {
    outline: none;
    border-color: var(--google-blue);
    box-shadow: 0 0 0 3px rgba(26,115,232,.2);
}

.output-container {
    width: 100%;
    height: 500px;
    overflow: auto;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background-color: #f8f9fa;
    position: relative;
}

/* Loading Overlay */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(240, 248, 255, 0.85);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    border-radius: 8px;
    z-index: 10;
}

.loader-message {
    font-family: 'Google Sans', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: var(--google-blue-dark);
    display: inline-block;
}

.loader-text {
    margin-top: 24px;
    text-align: center;
}

.spinner {
    width: 80px;
    height: 80px;
    border: 8px solid rgba(26, 115, 232, 0.15);
    border-top-color: var(--google-blue-dark);
    border-right-color: var(--google-blue);
    border-radius: 50%;
    filter: drop-shadow(0 3px 6px rgba(26, 115, 232, 0.15));
}

.sample-button.active {
    background: var(--google-blue);
    color: #fff;
    border-color: var(--google-blue);
    box-shadow: 0 2px 8px rgba(26,115,232,0.3);
    transform: translateY(-1px);
}

.sample-button.active .sample-modality {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.sample-button.active:hover {
    background: var(--google-blue-light);
    border-color: var(--google-blue-light);
    box-shadow: 0 3px 12px rgba(26,115,232,0.4);
}

.output-text {
    width: 100%;
    height: 100%;
    padding: 15px;
    margin: 0;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    border: none;
    overflow: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    box-sizing: border-box;
    background-color: transparent;
    font-size: 14px;
    line-height: 1.5;
}

/* Primary Button */
#predict-button {
    padding: 12px 24px;
    background: var(--google-blue);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(60,64,67,.15);
    margin: 12px auto 8px auto;
    display: block;
    position: relative;
    overflow: hidden;
}

#predict-button:hover {
    background: var(--google-blue-light);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(26,115,232,0.3);
}

#predict-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(26,115,232,0.3);
}

#predict-button:disabled {
    background: #BDC1C6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 1px 2px rgba(60,64,67,.1);
}

/* Highlighting */
.text-span {
    cursor: pointer;
    border-radius: 2px;
    transition: background-color 0.2s;
}

.text-span:hover {
    background-color: rgba(173, 216, 230, 0.5);
}

.highlight {
    background-color: rgba(173, 216, 230, 0.8) !important;
}

#output-text-container .significance-minor {
    text-decoration: underline;
    text-decoration-style: solid;
    text-decoration-color: #FBC02D; /* subtle yellow */
    text-decoration-thickness: 2px;
}

#output-text-container .significance-significant {
    text-decoration: underline;
    text-decoration-style: solid;
    text-decoration-color: #F48FB1; /* subtle light pink */
    text-decoration-thickness: 2px;
}

/* Report Structure */
.segment-label {
    font-weight: bold;
}

/* Sub-label styling */
.segment-sublabel {
    font-family: 'Google Sans', sans-serif; /* align with headers */
    font-weight: 600;                       /* stronger bold for clarity */
    color: var(--google-grey-900);
    margin-right: 2px;
    white-space: nowrap;
}

.segment-body {
    margin-bottom: 12px;
}

.section-header {
    font-family: 'Google Sans', sans-serif;
    font-weight: 600;
    font-size: 1.1em;
    margin-top: 12px;
    margin-bottom: 2px;
    color: var(--google-blue-dark);
}

textarea::selection {
    background-color: #ffeb3b;
    color: #000;
}

/* Instructions */
.instructions {
    background: var(--google-grey-100);
    border-radius: 8px;
    border: 1px solid var(--google-grey-200);
    padding: 10px 16px;
    font-size: 14px;
    color: var(--google-grey-700);
}

.instructions p {
    margin: 0;
    line-height: 1.6;
    color: #2c3e50;
    font-size: 1em;
}

.instructions strong {
    color: #1565c0;
    font-weight: 600;
}

.instructions ul {
    margin: 15px 0;
    padding-left: 20px;
}

.instructions li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.instructions li strong {
    color: #2c3e50;
}

.samples-container h3,
.header-container h1 {
    font-weight: 400;
}

/* Layout */
.page-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

.card {
    background: #fff;
    border: 1px solid var(--google-grey-200);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(60,64,67,.15);
    padding: 24px;
}



.sample-button {
    border-radius: 20px;
    padding: 5px 10px;
    min-width: unset;
    font-size: 0.85em;
}

.sample-title {
    font-size: 0.85em;
    margin-bottom: 2px;
}

.sample-meta {
    font-size: 0.7em;
}

.sample-modality {
    padding: 1px 6px;
}

.sample-button:hover {
    transform: translateY(-0.5px);
}

.text-area-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.banner.card {
    padding: 24px;
    border-radius: 16px;
    margin-top: 24px;
    border-color: var(--google-grey-200);
}

.banner-content {
    max-width: 820px;
    margin: 0 auto;
    text-align: left;
}

.sub-header {
    margin: 0;
    font-family: 'Google Sans Text', sans-serif;
    font-size: 18px;
    color: var(--google-grey-700);
}

/* Modality color tags */
.sample-modality.ct {
    background: #e3f2fd;
    color: #1565c0;
}
.sample-modality.mri {
    background: #e8f5e9;
    color: #2e7d32;
}
.sample-modality.xr {
    background: #fff3e0;
    color: #e65100;
}
.sample-modality.us {
    background: #e0f2f1;
    color: #00695c;
}
.sample-modality.pet {
    background: #fce4ec;
    color: #ad1457;
}
/* keep active chip modality white when selected */
.sample-button.active .sample-modality.ct,
.sample-button.active .sample-modality.mri,
.sample-button.active .sample-modality.xr,
.sample-button.active .sample-modality.us,
.sample-button.active .sample-modality.pet {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.primary-label {
    font-family: 'Google Sans Text', sans-serif;
    font-weight: 500;
    margin-top: 10px;
    margin-bottom: 2px;
    color: var(--google-blue-dark);
}

.finding-list {
    margin: 0 0 4px 0;
    padding-left: 0;
    list-style-position: inside;
}
.finding-list li {
    margin-bottom: 6px;
    line-height: 1.5;
    padding-left: 0.4em;
    text-indent: -0.4em;
}
.single-finding {
    margin: 0 0 6px 0;
}

@keyframes loaderPulse {
    0%, 100% { opacity: 0.35; }
    50% { opacity: 0.8; }
}

.source-link {
    display:none;
}

.footer-note {
    font-size: 13px;
    color: var(--google-grey-600);
    text-align: center;
    margin-top: 24px;
}
.footer-note .banner-link {
    font-weight: 500;
    color: var(--google-blue-dark);
}
.footer-note .hug-emoji {
    font-size: 16px;
}

.banner-description + .banner-description {
    border-top: 1px solid var(--google-grey-200);
    padding-top: 12px;
}

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}
.toggle-group {
    display: flex;
    gap: 16px;
    align-items: center;
}

.cache-toggle {
    font-size: 13px;
    color: var(--google-grey-700);
    user-select: none;
}

.raw-toggle,
.prompt-toggle {
    font-size: 13px;
    color: #546E7A;
    font-weight: 500;
    user-select: none;
    transition: color 0.2s ease;
}

.raw-toggle:hover,
.prompt-toggle:hover {
    color: #37474F;
}

.cache-toggle input,
.raw-toggle input {
    margin-right: 4px;
}

.cache-status {
    font-size: 11px;
    color: var(--google-grey-700);
    margin-left: 4px;
    opacity: 0.8;
}

.raw-json {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
    line-height: 1.4;
    background: #fafafa;
    border: 1px solid var(--google-grey-200);
    border-radius: 8px;
    padding: 16px;
    max-height: 500px;
    overflow-y: auto;
    overflow-x: hidden !important;
    word-wrap: break-word;
    word-break: break-word;
    width: 100%;
    box-sizing: border-box;
}

/* Disable animations to prevent flicker */
.raw-json * {
    animation: none !important;
    transition: none !important;
}

/* Override JSON formatter table layout for text wrapping */
.raw-json .json-formatter-row {
    display: block !important;
    width: 100% !important;
    table-layout: auto !important;
}

.raw-json .json-formatter-row > * {
    display: inline !important;
    max-width: 100% !important;
}

/* Force the entire JSON formatter to use block layout */
.raw-json .json-formatter-table {
    display: block !important;
    width: 100% !important;
    table-layout: fixed !important;
}

/* Fix table cell behavior to prevent text cutoff */
.raw-json .json-formatter-table,
.raw-json .json-formatter-table * {
    table-layout: fixed !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

/* Basic JSON formatter styling */
.raw-json .json-formatter-key { color: #0066cc; }
.raw-json .json-formatter-string { 
    color: #22863a;
    word-wrap: break-word;
    word-break: break-word;
    white-space: pre-wrap;
    display: inline !important;
    max-width: 100% !important;
    vertical-align: top !important;
    overflow-wrap: break-word !important;
}
.raw-json .json-formatter-number { color: #005cc5; }
.raw-json .json-formatter-boolean { color: #d73a49; }
.raw-json .json-formatter-null { color: #6f42c1; }
.raw-json .json-formatter-toggler { color: #586069; cursor: pointer; }
.raw-json .json-formatter-toggler:hover { color: #0366d6; }

/* Force text wrapping for all elements */
.raw-json .json-formatter-string,
.raw-json .json-formatter-key,
.raw-json .json-formatter-row,
.raw-json .json-formatter-row *,
.raw-json .json-formatter-preview {
    max-width: 100% !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
    white-space: pre-wrap !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
    width: auto !important;
}

/* Prevent horizontal scrolling and text cutoff */
.raw-json,
.raw-json * {
    max-width: 100% !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
    overflow-x: hidden !important;
}

/* Additional fix for the raw output container */
#raw-output {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-wrap: break-word !important;
}

.input-header,
.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 4px;
    margin-bottom: 8px;
}

.input-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* Panel controls at bottom of Input/Output container */
.panel-controls {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 16px !important;
    padding: 4px 16px !important;
    border-top: 1px solid #e9ecef !important;
    background: #fafbfc !important;
    border-radius: 0 0 16px 16px !important;
    margin-top: 0px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    flex-wrap: wrap !important;
    text-align: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
    grid-column: 1 / -1 !important;
}

.input-header h2,
.output-header h2 {
    margin: 0;
    line-height: 1.2;
}

.text-area-wrapper h2 {
    border: none;
}

#prompt-output {
    width: 100%;
    height: 500px;
    overflow: auto;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: #fafafa;
    padding: 16px;
    box-sizing: border-box;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 12px;
    line-height: 1.4;
    white-space: normal; /* Changed from pre-wrap to normal for better markdown rendering */
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Markdown styling for prompt output */
#prompt-output h1 {
    font-family: 'Google Sans', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--google-blue-dark);
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--google-grey-200);
}

#prompt-output h2 {
    font-family: 'Google Sans', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: var(--google-blue-dark);
    margin: 24px 0 12px 0;
}

#prompt-output h3 {
    font-family: 'Google Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--google-grey-700);
    margin: 16px 0 8px 0;
}

#prompt-output strong {
    font-weight: 600;
    color: var(--google-blue-dark);
}

#prompt-output blockquote {
    margin: 12px 0;
    padding: 8px 16px;
    border-left: 4px solid var(--google-blue);
    background: rgba(26, 115, 232, 0.05);
    font-style: italic;
}

#prompt-output code {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 11px;
}

#prompt-output pre {
    background: #f5f5f5;
    border: 1px solid var(--google-grey-200);
    border-radius: 6px;
    padding: 12px;
    overflow-x: auto;
    margin: 12px 0;
    font-size: 11px;
    line-height: 1.3;
    word-wrap: break-word;
    white-space: pre-wrap;
}

#prompt-output pre code {
    background: none;
    padding: 0;
    border-radius: 0;
}

#prompt-output ul, #prompt-output ol {
    margin: 8px 0;
    padding-left: 20px;
}

#prompt-output li {
    margin-bottom: 4px;
    line-height: 1.4;
}

#prompt-output p {
    margin: 8px 0;
    line-height: 1.5;
    font-family: 'Google Sans Text', sans-serif;
    font-size: 13px;
}

.no-bold {
    font-weight: 400;
}

/* Model dropdown */
.model-select-container {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    margin: 0;
}

.model-select-container select {
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid var(--google-grey-200);
    font-size: 14px;
    background: #fff;
    cursor: pointer;
}

.model-select-container select:focus {
    outline: none;
    border-color: var(--google-blue);
    box-shadow: 0 0 0 3px rgba(26,115,232,.2);
}

.model-select-container label {
    font-weight: 500;
    color: var(--google-grey-700);
}

/* Banner divider */
.banner-divider {
    border: none;
    border-top: 1px solid var(--google-grey-200);
    margin: 24px 0 18px 0;
}

/* Interface Options Panel */
.interface-options-panel {
    margin: 16px 0;
    padding: 16px !important; /* Override default card padding for more compact layout */
}

.interface-options-header {
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-radius: 8px;
    padding: 4px;
    margin: -4px;
}

.interface-options-header:hover {
    background-color: var(--google-grey-100);
}

.interface-options-title {
    font-family: 'Google Sans', sans-serif;
    font-size: 20px;
    font-weight: normal;
    margin: 0 0 6px 0;
    color: var(--google-grey-900);
}

.interface-options-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--google-grey-700);
    margin-bottom: 4px;
}

.expand-icon {
    color: var(--google-blue-dark);
    transition: transform 0.3s ease, color 0.2s ease, background-color 0.2s ease;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.9;
    padding: 3px;
    border-radius: 50%;
    background-color: transparent;
}

.expand-icon:hover {
    color: var(--google-blue);
    opacity: 1;
    background-color: rgba(66, 133, 244, 0.1);
    transform: scale(1.05);
}

.expand-icon.expanded {
    transform: rotate(180deg);
}

.expand-icon.expanded:hover {
    transform: rotate(180deg) scale(1.05);
}

.interface-options-content {
    margin-top: 10px;
    transition: all 0.3s ease;
}

.interface-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
    margin-bottom: 10px;
}

.interface-option {
    padding: 12px;
    border: 1px solid var(--google-grey-200);
    border-radius: 8px;
    background: #fff;
    transition: border-color 0.2s ease;
}

.interface-option:hover {
    border-color: var(--google-blue-light);
}

.option-header {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
}

.option-icon {
    font-size: 18px;
    color: var(--google-blue);
    margin-right: 6px;
}

.option-header strong {
    font-family: 'Google Sans', sans-serif;
    font-size: 14px;
    color: var(--google-grey-900);
}

.option-description {
    font-size: 13px;
    color: var(--google-grey-700);
    line-height: 1.3;
    margin: 0;
}

.interface-options-note {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    background: var(--google-grey-100);
    border-radius: 6px;
    font-size: 12px;
    color: var(--google-grey-700);
}

.note-icon {
    font-size: 16px;
    color: var(--google-blue);
    margin-right: 6px;
}

/* Clinical Significance Legend */
.clinical-significance-legend {
    margin: 0 0 4px 0;
    padding: 6px 12px;
    background: #fff;
    border: 1px solid var(--google-grey-200);
    border-radius: 6px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
    font-size: 12px;
}

.legend-title {
    font-weight: 600;
    color: var(--google-grey-700);
    font-size: 12px;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    color: var(--google-grey-700);
    font-weight: 500;
}

.legend-line {
    display: inline-block;
    width: 18px;
    height: 2px;
    border-radius: 1px;
    margin-right: 4px;
}

.legend-line.minor {
    background-color: #FBC02D;
}

.legend-line.major {
    background-color: #F48FB1;
}

.action-bar {
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    position: relative;
}

/* center process button within action bar */
.action-bar #predict-button {
    margin: 0;
}

/* Position legend on the right */
.clinical-significance-legend {
    position: absolute;
    right: 0;
}