/* Basic resets and typography */
html {
    font-family: 'Inter', sans-serif;
    background-color: #f6f7fb;
    color: #202124;
}

body {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 1.5rem 1rem;
    text-align: center;
}

header h1 {
    margin: 0 0 0.5rem 0;
    font-size: 1.8rem;
}

header p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.4;
}

main {
    flex: 1;
    padding: 2rem 1rem;
    max-width: 800px;
    margin: 0 auto;
}

form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

form input[type="text"] {
    flex: 1 1 300px;
    padding: 0.75rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

form button {
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
    border: none;
    border-radius: 4px;
    background-color: #3498db;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.2s;
}

form button:hover {
    background-color: #2980b9;
}

#status {
    margin-bottom: 1rem;
    font-weight: 600;
}

.hidden {
    display: none;
}

#resultSection h2 {
    margin-top: 0;
}

/* Summary table now uses a responsive grid layout to present key-value pairs as cards */
#summaryTable {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    list-style: none;
    padding: 0;
    border: none;
}
#summaryTable tr {
    display: contents;
}
#summaryTable th,
#summaryTable td {
    border: none;
    padding: 0.25rem 0;
}
#summaryTable th {
    font-weight: 600;
    color: #555;
    margin-right: 0.25rem;
}
#summaryTable td {
    font-weight: 400;
    color: #202124;
}

#rawDetails {
    margin-top: 1rem;
}

#rawOutput {
    white-space: pre-wrap;
    font-family: monospace;
    background-color: #f6f8fa;
    padding: 1rem;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    max-height: 400px;
    overflow: auto;
}

/* Detailed sections styling */
#detailsContainer details {
    margin-bottom: 1rem;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}
#detailsContainer details summary {
    font-weight: 600;
    cursor: pointer;
    outline: none;
    padding: 0.75rem 1rem;
    background-color: #f8f9fb;
}
#detailsContainer details[open] summary {
    border-bottom: 1px solid #e0e0e0;
}
#detailsContainer details table {
    width: 100%;
    border-collapse: collapse;
}
#detailsContainer details th,
#detailsContainer details td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid #f0f0f0;
}
#detailsContainer details tr:last-child th,
#detailsContainer details tr:last-child td {
    border-bottom: none;
}
#detailsContainer details th {
    background-color: #f8f9fb;
    font-weight: 600;
    width: 40%;
    color: #555;
}

footer {
    background-color: #f0f3f7;
    color: #555;
    text-align: center;
    padding: 1rem;
    font-size: 0.9rem;
}

footer a {
    color: #3498db;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Cards layout for displaying variant annotations */
.cards-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.card {
    flex: 1 1 260px;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
    padding: 1rem;
    position: relative;
}

.card h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    color: #2c3e50;
}

.card .card-content {
    font-size: 0.95rem;
    line-height: 1.4;
}
.card .card-content span {
    display: block;
    margin-bottom: 0.25rem;
}
.card a {
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
}
.card a:hover {
    text-decoration: underline;
}

/* Predictor emojis styling */
.predictor-emojis {
    font-size: 1.5rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Predictor summary in predictors card: show label and emoji pairs inline */
.predictor-summary {
    font-size: 1.1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.predictor-summary strong {
    margin-right: 0.15rem;
}

/* Style details within cards for predictor values */
.card-content details {
    margin-top: 0.5rem;
}
.card-content details summary {
    cursor: pointer;
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.card-content details ul {
    margin: 0;
    padding-left: 1.2rem;
    list-style: disc;
}

/* Style tables inside card details (e.g., gnomAD population data) */
.card-content details table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.card-content details th,
.card-content details td {
    padding: 0.25rem 0.5rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid #f0f0f0;
}
.card-content details th {
    background-color: #f8f9fb;
    font-weight: 600;
    color: #555;
}