/* --- UNIFIED STYLESHEET (style.css) --- */

/* ----------------------------------------
   Base & General Styling
   ---------------------------------------- */
body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: #333;
    padding-top: 20px;
    -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none;   /* Safari */
    -khtml-user-select: none;    /* Konqueror HTML */
    -moz-user-select: none;      /* Old versions of Firefox */
    -ms-user-select: none;       /* Internet Explorer/Edge */
    user-select: none;           /* Non-prefixed version */
}

.tasks-heading {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #444;
}

/* ----------------------------------------
   Unified Tab Navigation
   ---------------------------------------- */
.v-tabs ul {
    display: flex;
    justify-content: left; /* This line is added to center the tabs */
    overflow-x: auto;
    white-space: nowrap;
    list-style: none;
    padding: 0;
    margin: 0;
    border-bottom: 1px solid #ddd;
}
.v-tabs li {
    display: inline-block;
    margin: 0;
}
.v-tabs a {
    display: inline-block;
    padding: 0.75rem 1.25rem;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    cursor: pointer;
}
.v-tabs li.is-active > a {
    color: #3273dc;
    border-bottom: 3px solid #3273dc;
}
.v-tabs a:hover {
    background-color: #f0f0f0;
    border-radius: 4px;
}

/* ----------------------------------------
   Subheading & Instructions
   ---------------------------------------- */
.subheading-box {
    background-color: #f7fdf7;
    border-left: 4px solid #3c763d;
    padding: 0.75rem 1rem;
    margin: 1rem 0 1.5rem 0;
    border-radius: 4px;
}
.subheading-box .title {
    color: #3c763d;
    font-size: 1.25rem;
    margin: 0;
    font-weight: 600;
}
.v-instruction-container .v-content {
    text-align: left;
    padding-left: 10%;
    padding-right: 10%;
}

/* ----------------------------------------
   Main Experiment Container
   ---------------------------------------- */
.v-datalist-container.components-list {
    border: 2px solid #8dc63f;
    border-radius: 8px;
    padding: 1rem;
    background-color: #fafafa;
    height: 100%;
}
.v-datalist-title, .v-datalist-subtitle {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #eee;
    text-align: center;
    font-weight: 600;
    color: #363636;
}

/* ----------------------------------------
   Standardized Content Panel
   ---------------------------------------- */
.white-boxed-panel {
    background-color: #fff;
    border: 1px solid #dbdbdb;
    border-radius: 6px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07);
}
.white-boxed-panel:last-child {
    margin-bottom: 0;
}

/* ----------------------------------------
   Controls: Sliders, Inputs & Buttons
   ---------------------------------------- */
.controls-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 0.5rem 0;
}
.field {
    flex: 1;
    min-width: 250px;
    margin-bottom: 1rem;
}
.label {
    display: block;
    text-align: center;
    font-weight: 500;
    margin-bottom: 0.5rem;
}
.value-display {
    display: block;
    text-align: center;
    font-weight: bold;
    margin-top: 0.3rem;
    color: #3273dc;
}
.slider {
    -webkit-appearance: none;
    width: 100%;
    height: 10px;
    border-radius: 5px;
    background: #ddd;
    outline: none;
}
.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3273dc;
    cursor: pointer;
}
.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3273dc;
    cursor: pointer;
}
.button.is-primary {
    appearance: none;
    background-color: #2ea44f;
    border: 1px solid rgba(27, 31, 35, .15);
    border-radius: 6px;
    box-shadow: rgba(27, 31, 35, .1) 0 1px 0;
    box-sizing: border-box;
    color: #fff;
    cursor: pointer;
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    padding: 6px 16px;
    text-align: center;
    margin-left: 10px;
}
.button.is-primary:hover {
    background-color: #2c974b;
}

input.input {
    width: 100%;
    padding: 0.5em;
    border-radius: 4px;
    border: 1px solid #dbdbdb;
}

/* ----------------------------------------
   Chart, Animation & Observation Styling
   ---------------------------------------- */
.chart-wrapper {
    position: relative;
    width: 100%;
    min-height: 250px;
}
canvas {
    width: 100% !important;
    height: auto !important;
}
#observations {
    font-size: 1.1rem;
    line-height: 1.7;
    margin: 0 auto;
    padding-top: 1rem;
}
#observations .correct { color: #3c763d; font-weight: bold; }
#observations .incorrect { color: #a94442; font-weight: bold; }
#observations .info { color: #31708f; }
#observations .warning { color: #8a6d3b; }

.plots-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
    margin-top: 1rem;
}

/* ----------------------------------------
   Responsiveness
   ---------------------------------------- */
@media (max-width: 768px) {
    .v-instruction-container .v-content {
        padding-left: 5%;
        padding-right: 5%;
    }
    .chart-wrapper {
        height: 350px;
    }
}
@media (max-width: 620px) {
    .controls-container {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    .field {
        width: 100%;
        max-width: none;
        margin-bottom: 0.5rem;
    }
}

/* Grid container for the three main sliders */
.controls-grid {
    display: grid;
    /* Create three equal-width columns */
    grid-template-columns: repeat(3, 1fr); 
    /* Add space between the sliders */
    gap: 2rem; 
    align-items: center;
}

/* Grid container for the action buttons/inputs below the sliders */
.actions-grid {
    display: grid;
    /* Create two equal-width columns */
    grid-template-columns: 1.5fr 1fr;
    gap: 1rem;
    align-items: center;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

/* Ensure the chart has enough space */
.chart-wrapper {
    height: 400px; /* Or any desired height */
    margin-top: 1rem;
}

/* Make value displays slightly bolder */
.value-display {
    font-weight: 600;
}

/* --- Styles for gaussian-2d-pdf.html --- */

.matrix-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.matrix-symbol {
    font-size: 2rem;
}

.matrix-body {
    position: relative; /* Needed for positioning the brackets */
    padding: 0 10px; /* Space for the brackets */
}

/* Create the brackets using borders on pseudo-elements */
.matrix-body::before,
.matrix-body::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 10px; /* Width of the horizontal serif part of the bracket */
    height: 100%;
    border-color: #363636;
    border-style: solid;
    border-width: 0;
}

/* Left bracket */
.matrix-body::before {
    left: 0;
    border-left-width: 2px;
    border-top-width: 2px;
    border-bottom-width: 2px;
}

/* Right bracket */
.matrix-body::after {
    right: 0;
    border-right-width: 2px;
    border-top-width: 2px;
    border-bottom-width: 2px;
}

.matrix-inputs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    max-width: 250px;
    padding: 0.25rem; /* Small padding inside the brackets */
}

.plots-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}