@import url('https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@300;400;600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Neuton:wght@300;400;700&display=swap');

body {
    font-family: 'Source Sans Pro', sans-serif;
    background-color: #f8f6f1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    margin: 0;
    overflow-x: auto;
}

h1,
h2 {
    font-family: 'Neuton', serif;
    color: #333;
    font-weight: 600;
    margin-bottom: 15px;
    letter-spacing: -0.02em;
    font-size: 42px;

}

.panel-title {
    font-family: 'Neuton', serif;
    color: #333;
    font-weight: 600;
    margin-bottom: 5px;
    letter-spacing: -0.02em;
    font-size: 16px;
}

p {
    color: #333;
    font-size: 10px;
    font-weight: 300;

}

.visualization-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

svg {
    display: block;
    margin: 0 auto;
}

.control-panel {
    background-color: rgba(248, 246, 241, 0.9);
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    z-index: 50;
    max-width: 50rem;
}

.control-panel-fixed {
    position: fixed;
    top: 1rem;
    left: 1rem;
    transform: none;
    transition: all 0.3s ease-in-out;
    backdrop-filter: blur(5px);
}

.control-panel-centered {
    position: absolute;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    margin: 1rem auto;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.control-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}


/* Horizontal controls row */
.horizontal-controls {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    flex-wrap: wrap;
    /* allow wrapping on small screens */
    justify-content: center;
    /* center controls horizontally */
    align-items: flex-end;
    /* align labels with buttons */
    width: 100%;
}

/* Center the title and description above controls */
.control-panel>.flex.flex-col.items-center {
    text-align: center;
}

/* Ensure labels are above the boxes */
.control-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

select,
input {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
    background: white;
    min-width: 10px;
    max-width: 200px;
    font-family: 'Source Sans Pro', serif;
    font-weight: 400;
}

/* Styles for the new "unieke woorden" plot */
.plots-grid-wrapper {
    display: flex;
    justify-content: center;
    max-width: 100%;
}

.plots-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    max-width: 100vw;
    margin: 1rem auto;
}

@media (max-width: 768px) {
    .plots-grid {
        grid-template-columns: 1fr;
    }
}

.plot-container {
    background: #f8f6f1;
    padding: 1rem;
    overflow-y: auto;
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.curved-line {
    fill: none;
    stroke-width: 1;
    stroke-dasharray: 4, 3;
    transition: all 0.3s ease;
}

.bar-line {
    stroke-width: 1;
    stroke-linecap: butt;
}

.fan-fill {
    stroke: none;
    transition: all 0.3s ease;
}

.word-label {
    fill: #444;
    font-size: 20px;
    font-family: 'Neuton', serif;
    font-weight: 400;
    text-anchor: start;
}

.party-title {
    font-family: 'Neuton', serif;
    font-weight: 700;
    font-size: 24px;
}

.x-axis .tick text {
    font-family: 'Source Sans Pro', sans-serif;
    text-transform: uppercase;
    font-weight: 300;
    font-size: 15px;
    fill: #666;
}

.axis path,
.axis line {
    stroke-width: 0;
}

.loading {
    text-align: center;
    color: #666;
    font-style: italic;
    margin: 40px 0;
}

.hidden {
    display: none;
}

.avg-freq-circle {
    opacity: 0.8;
}

.bar-label {
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 8px;
    fill: #666;
    font-weight: 200;
}

.plot-button {
    background: #111111;
    color: white;
    border: none;
    padding: 10px 10px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    width: 34px;
}

.plot-button:hover {
    background: #6a6a6a;
}
