/* Import Pure CSS framework */
@import url('https://unpkg.com/purecss@2.0.6/build/pure-min.css');

/* General styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #206fb2;
}


.page {
    width: 90%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    background-color: white;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    border-radius: 8px;
    margin-bottom: 40px;
    margin-top: 40px;
}

/* Headers */
h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 2.5em;
}

h2 {
    color: #34495e;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
    margin-top: 40px;
    margin-bottom: 20px;
}

h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    align-self: flex-start;
}

/* Section spacing */
.pure-g {
    display: flex;
}

/* Make Pure CSS grid columns align vertically */
.pure-u-1-1,
.pure-u-1-2,
.pure-u-1-3,
.pure-u-2-3 {
    display: flex;
}

/* Description boxes */
.description {
    padding: 20px;
    background-color: #ecf0f1;
    border-radius: 8px;
    margin: 10px;
    display: flex;
    flex-direction: column;
}


.description p {
    margin-bottom: 15px;
    color: #2c3e50;
    text-align: justify;
}

/* Visualization containers */
.vis-container {
    margin: 10px;
    padding: 10px;
    background-color: #ecf0f1;
    border-radius: 8px;
    /* box-shadow: 0 2px 4px rgba(0,0,0,0.5); */
    flex: 1;                   /* Take up available space */
    width: 100%;               /* Fill available width */
    display: flex;
    flex-direction: column;
    justify-content: center;   /* Center vertically */
    align-items: center;       /* Center horizontally */
    overflow: visible;
    min-height: 300px;         /* Minimum height for consistency */
}

/* Make Vega embeds fill the container */
.vis-container .vega-embed {
    flex: 1;                   /* Take up remaining space */
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;  /* Center the chart vertically */
    align-items: center !important;      /* Center the chart horizontally */
}

/* Vega controls styling */
.vis-container .vega-bindings {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    margin-top: 15px !important;
    margin-bottom: 5px !important;
    padding: 10px !important;
    background-color: #ecf0f1 !important;
    border-radius: 5px !important;
    order: 2;
}

.vis-container .vega-bindings label {
    margin: 0 10px !important;
    font-weight: 500 !important;
    color: #495057 !important;
}

.vis-container .vega-bindings input,
.vis-container .vega-bindings select {
    margin-left: 5px !important;
    margin-right: 15px !important;
    padding: 2px 6px !important;
    border: 1px solid #ced4da !important;
    border-radius: 3px !important;
    font-size: 12px !important;
}

/* Loading state */
.vis-container:empty::before {
    content: "Loading visualisation...";
    color: #7f8c8d;
    font-style: italic;
}

/* Force responsive behavior for all visualizations */
.vega-embed canvas,
.vega-embed svg {
    max-width: 100% !important;
    height: auto !important;
}

/* Footer styling */
.footer {
    margin-top: 40px;
    padding: 20px 0;
    border-top: 1px solid #e1e8ed;
}

.footer p {
    font-size: 12px;
    color: #666666;
    text-align: center;
    margin: 0;
    line-height: 1.4;
}

.footer a {
    font-size: 12px;
    color: #666666;
    text-align: center;
    margin: 0;
    line-height: 1.4;
    text-decoration: none;
}

.footer a:hover {
    color: #3498db;
    text-decoration: underline;
}