:root {
    --primary-color: #E73439;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #fff;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background-color: var(--primary-color);
    color: white;
}

.header-left,
.header-right {
    flex: 0 0 auto;
}

.header-center {
    flex: 1;
    text-align: center;
}

.header-center h1,
.header-center p {
    margin: 0;
    line-height: 1.2;
}

.logo {
    max-width: 150px;
    /* Adjust as needed */
    height: auto;
}

.content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
    margin-top: 20px;
}

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

.input-panel {
    background-color: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.input-panel h2 {
    margin: 0px !important;
}

.results-panel {
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    /*box-shadow: 0 2px 5px rgba(0,0,0,0.1);*/
    width:930px;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

input:not([type="checkbox"]),
select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-bottom: 15px;
    font-weight: bold;
}

.checkbox-label input[type="checkbox"]:disabled+span {
    cursor: not-allowed;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
    cursor: pointer;
}

/* Target the label when its checkbox is disabled */
.checkbox-label.disabled {
    cursor: not-allowed;
    color: #6c757d;
}

/* Make sure the checkbox itself still shows as disabled */
.checkbox-label.disabled input[type="checkbox"] {
    cursor: not-allowed;
}

/* Keep the label text styled as disabled */
.checkbox-label.disabled span {
    cursor: not-allowed;
}

button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #003d80;
}

.chart-container {
    margin-top: 20px;
    height: 300px;
    position: relative;
}
.table-info-icon {
    color: white;
    cursor: pointer;
}
th .info-icon {
    color: white;
}
.result-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 14px !important;
}

.result-table th,
.result-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
    font-size: 14px !important;
}

.result-table th {
    background-color: black;
    color: white;
}

.result-table tr:nth-child(even) {
    background-color: #ffffff;
}

h3 {
    color: #000000;
}

.tab-buttons {
    display: flex;
    width: 100%;
    /* Fill the full width */
}

.parameter {
    box-shadow: 5px 5px 15px #c2c2c2;
    height: fit-content;
    border-radius: 15px;
}

/* Base style for both tabs */
.tab-button {
    width: 50%;
    text-align: center;
    cursor: pointer;
    padding: 25px 0;
    font-weight: 600;
    background-color: #fff;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-bottom: none;
    /* If you don't want a bottom border, remove it */
    transition: background-color 0.3s ease;
}

/* Left tab: only top-left corner is rounded */
.tab-button:first-child {
    border-top-left-radius: 25px;
    border-top-right-radius: 0;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

/* Right tab: only top-right corner is rounded */
.tab-button:last-child {
    border-left: none;
    /* No double border in the middle */
    border-top-left-radius: 0;
    border-top-right-radius: 25px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

/* Hover effect (optional) */
.tab-button:hover {
    background-color: var(--primary-color);
    color: #fff;
}

/* Active (selected) tab: filled background */
.tab-button.active {
    background-color: var(--primary-color);
    color: #fff;
}

.tab-content {
    display: none;
    padding: 15px;
    border: 2px solid var(--primary-color);
    border-radius: 0px 0px 15px 15px;
}

.tab-content.active {
    display: block;
}

.info-box {
    background-color: #e9f7ff;
    border-left: 4px solid var(--primary-color);
    padding: 10px 15px;
    margin-bottom: 15px;
}

.warning {
    color: var(--danger-color);
    font-weight: bold;
}

.success {
    color: var(--success-color);
    font-weight: bold;
}

/* Capacity indicator styles */
.capacity-indicator {
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

.capacity-indicator i {
    font-size: 1.2rem;
}

.capacity-red {
    color: var(--danger-color);
}

.capacity-orange {
    color: var(--warning-color);
}

.capacity-green {
    color: var(--success-color);
}

/* Custom legend styles */
.custom-legend {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin: 10px 0;
}

.legend-item {
    display: flex;
    align-items: center;
    margin: 0 10px;
    cursor: pointer;
    user-select: none;
}

.legend-color {
    width: 12px;
    height: 12px;
    display: inline-block;
    margin-right: 5px;
    border: 1px solid #333;
}

.legend-label {
    transition: opacity 0.2s;
}

/* Tank Visualization Styles */
.visualization-wrapper {
    margin-top: 20px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.visualization-container {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    min-height: 500px;
    overflow: hidden;
    /* Add this line */
}

.tank-visualization {
    position: relative;
    height: 500px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 50px;
}

/* Tank Components */
.tank-top {
    position: absolute;
    border: 2px solid #333;
    border-bottom: none;
    border-radius: 50% 50% 0 0;
    background-color: #fff;
    height: 20px;
    z-index: 3;
    padding-top: 30px;
}

.tank-body {
    position: absolute;
    border-left: 2px solid #333;
    border-right: 2px solid #333;
    border-bottom: 2px solid #333;
    background-color: #e6f7ff;
    z-index: 2;
}

.tank-body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background-color: white;
    animation: liquidWave 4s ease-in-out infinite;
}

@keyframes liquidWave {

    0%,
    100% {
        clip-path: polygon(0% 0%,
                15% 60%,
                33% 20%,
                50% 60%,
                67% 30%,
                84% 80%,
                100% 10%,
                100% 100%,
                0% 100%);
    }

    50% {
        clip-path: polygon(0% 80%,
                15% 20%,
                33% 60%,
                50% 30%,
                67% 70%,
                84% 20%,
                100% 80%,
                100% 100%,
                0% 100%);
    }
}

.tank-bottom {
    position: absolute;
    border: 2px solid #333;
    border-top: none;
    border-radius: 0 0 50% 50%;
    background-color: #a9dcff;
    z-index: 1;
}

.diameter-label {
    position: absolute;
    text-align: center;
    font-size: 14px;
    color: #333;
    z-index: 5;
}

/* Side labels */
.piston-height-label,
.bottom-height-label {
    position: absolute;
    font-size: 14px;
    color: #333;
    white-space: nowrap;
    z-index: 10;
}

/* Measurement boxes */
.piston-measurement,
.bottom-measurement {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 20;
}

.piston-measurement .measurement-box {
    background-color: #e6f7ff;
    border: 1px solid #91d5ff;
    padding: 3px 8px;
    border-radius: 4px;
    text-align: center;
    margin-bottom: 5px;
    font-size: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.bottom-measurement .measurement-box {
    background-color: #f6ffed;
    border: 1px solid #b7eb8f;
    padding: 3px 8px;
    border-radius: 4px;
    text-align: center;
    margin-bottom: 5px;
    font-size: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.arrow-down,
.arrow-up {
    width: 0;
    height: 0;
    margin: 2px 0;
}

.arrow-down {
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #91d5ff;
}

.arrow-up {
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid #b7eb8f;
}

/* Connecting lines to measurements */
.piston-measurement::before {
    content: "";
    position: absolute;
    right: 100%;
    top: 50%;
    width: 25px;
    height: 1px;
    background-color: #91d5ff;
}

.bottom-measurement::before {
    content: "";
    position: absolute;
    right: 100%;
    top: 50%;
    width: 25px;
    height: 1px;
    background-color: #b7eb8f;
}

.total-height-label {
    margin-top: 20px;
    font-size: 16px;
    text-align: center;
}

.warning-message {
    margin-top: 10px;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
    width: 100%;
    max-width: 600px;
    font-weight: bold;
}

.warning-message.high-risk {
    background-color: #ffe6e6;
    color: #cc0000;
    border: 1px solid #ffcccc;
}

.warning-message.low-risk {
    background-color: #e6ffe6;
    color: #006600;
    border: 1px solid #ccffcc;
}

/* Toggle Sections */
.toggle-section {
    margin-bottom: 20px;
}

.toggle-section h3 {
    color: #000000;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-top: 0;
}

/* Toggle Buttons */
.toggle-button {
    width: 100%;
    display: flex;
    align-items: center;
    background-color: #f6f6f6;
    /*border: 1px solid #dee2e6;*/
    border-radius: 4px;
    padding: 12px 15px;
    text-align: left;
    cursor: pointer;
    font-weight: bold;
    color: #E73439;
    transition: background-color 0.2s;
    margin-bottom: 2px;
}

.toggle-button:hover {
    background-color: #e9ecef;
}

.toggle-button.active {
    background-color: #e5f1ff;
    border-color: #b8d6ff;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    margin-bottom: 0;
}

/* Toggle Icons */
.toggle-icon-left {
    margin-right: 20px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.toggle-icon-right {
    margin-left: auto;
    flex-shrink: 0;
}

/* Toggle Title */
.toggle-title {
    flex-grow: 1;
    display: flex;
    align-items: center;
    color:#000000;
}

.intensity-factor {
    font-weight: normal;
    color: #6c757d;
    margin-left: 10px;
    font-size: 0.9em;
}

/* Toggle Content */
.toggle-content {
    background-color: #f9f9f9;
    /*border: 1px solid #dee2e6;*/
    border-top: none;
    padding: 15px;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
    margin-bottom: 10px;
}

.toggle-content p:first-child {
    margin-top: 0;
}

.toggle-content ul {
    margin-bottom: 0;
}

/* Specific Styling */
.disclaimer-container {
    margin: 15px 0;
}

.mixing-guide,
.mixer-guide {
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

.mixing-note {
    font-style: italic;
    color: #6c757d;
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: 15px;
}

.parameter {
    box-shadow: 5px 5px 15px #c2c2c2;
    height: fit-content;
    border-radius: 15px;
}

.tippy-box {
    background-color: var(--primary-color) !important;
}

/* Responsive Design */
@media screen and (max-width: 1024px) {

    /* Tablet Styles */
    .container {
        max-width: 95%;
        padding: 15px;
    }

    .header {
        padding: 15px;
        flex-wrap: wrap;
    }

    .header-left,
    .header-right {
        flex: 0 0 40%;
    }

    .header-center {
        flex: 0 0 100%;
        order: 3;
        margin-top: 10px;
    }

    .logo {
        max-width: 120px;
    }

    .content {
        gap: 15px;
    }

    .chart-container {
        height: 250px;
    }

    .result-table {
        font-size: 13px;
    }

    .tab-button {
        padding: 20px 0;
    }

    .visualization-container {
        transform: scale(0.9);
        margin: 0 auto;
    }
}

@media screen and (max-width: 768px) {

    /* Mobile Styles */
    .container {
        padding: 10px;
    }

    .header {
        padding: 10px;
    }

    .header-left,
    .header-right {
        flex: 0 0 100%;
        text-align: center;
        margin-bottom: 10px;
    }

    .header-center {
        margin-top: 5px;
    }

    .header-center h1 {
        font-size: 1.5em;
    }

    .logo {
        max-width: 100px;
        margin: 0 auto;
        display: block;
    }

    .input-panel,
    .results-panel {
        padding: 15px;
    }

    .form-group {
        margin-bottom: 12px;
    }

    input:not([type="checkbox"]),
    select {
        padding: 10px;
        font-size: 16px;
        /* Prevents zoom on iOS */
    }

    button {
        width: 100%;
        padding: 12px;
        margin-bottom: 10px;
        font-size: 16px;
    }

    .result-table {
        font-size: 12px;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .result-table th,
    .result-table td {
        padding: 6px;
        white-space: nowrap;
    }

    .tab-buttons {
        flex-direction: column;
    }

    .tab-button {
        width: 100%;
        padding: 15px 0;
        border-radius: 0;
    }

    .tab-button:first-child {
        border-radius: 15px 15px 0 0;
    }

    .tab-button:last-child {
        border-left: 2px solid var(--primary-color);
        border-radius: 0;
    }

    .visualization-container {
        transform: scale(0.8);
        margin: 0 auto;
    }

    .visualization-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 10px;
    }

    .chart-container {
        height: 200px;
        margin-top: 15px;
    }

    .custom-legend {
        flex-direction: column;
        align-items: flex-start;
    }

    .legend-item {
        margin: 5px 0;
    }

    .toggle-section {
        margin: 10px 0;
    }

    .toggle-button {
        padding: 8px;
    }

    .toggle-content {
        padding: 10px;
    }

    .disclaimer-container {
        margin: 10px 0;
        font-size: 0.9em;
    }

    /* Improve touch targets */
    .checkbox-label {
        padding: 8px 0;
    }

    .checkbox-label input[type="checkbox"] {
        width: 20px;
        height: 20px;
    }
}

@media screen and (max-width: 480px) {

    /* Small Mobile Styles */
    .container {
        padding: 5px;
    }

    .header-center h1 {
        font-size: 1.2em;
    }

    .input-panel,
    .results-panel {
        padding: 10px;
    }

    .visualization-container {
        transform: scale(0.7);
    }

    .result-table {
        font-size: 11px;
    }

    .tab-button {
        padding: 12px 0;
    }

    .chart-container {
        height: 180px;
    }
}

/* Fix for iOS input zoom */
@media screen and (max-width: 768px) {

    input[type="text"],
    input[type="number"],
    select,
    textarea {
        font-size: 16px !important;
    }
}

/* Improve scrolling performance */
* {
    -webkit-overflow-scrolling: touch;
}

/* Fix for position:fixed elements on iOS */
.fixed-element {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}