/* WebSocket connection styles */
.connection-status {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin: 10px 20px;
    font-size: 14px;
}

#connection-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 5px;
}

.connected {
    color: #34c759;
}

.disconnected {
    color: #ff3b30;
}

.connecting {
    color: #ffcc00;
}

.error {
    color: #ff3b30;
}

/* Chart Controls */
.chart-controls {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.time-range-select {
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #ddd;
    font-size: 12px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    max-width: 500px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: black;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
}

.form-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.btn-primary {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

#serverConfigBtn {
    background-color: transparent;
    border: 1px solid #ddd;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.new-row {
    animation: highlight 2s;
}

@keyframes highlight {
    0% {
        background-color: rgba(255, 255, 0, 0.5);
    }

    100% {
        background-color: transparent;
    }
}

/* Additional base styles that were likely in the original styles.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background-color: #f7f9fc;
    color: #333;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

h1 {
    font-size: 1.5rem;
    color: #333;
}

h2 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #333;
}

main {
    padding: 20px;
}

footer {
    margin-top: 20px;
    padding: 15px 0;
    background-color: white;
    border-top: 1px solid #eee;
    text-align: center;
    font-size: 0.8rem;
    color: #666;
}

/* Grid Layout */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

/* Sections */
.section {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.metric-card {
    display: flex;
    align-items: center;
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
}

.icon-container {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 12px;
}

.pink {
    background-color: rgba(113, 142, 191, 0.1);
}

.blue {
    background-color: rgba(113, 142, 191, 0.1);
}

.yellow {
    background-color: rgba(252, 170, 11, 0.1);
}

.teal {
    background-color: rgba(22, 219, 204, 0.1);
}

.metric-label {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 5px;
}

.metric-value {
    font-size: 1.2rem;
    font-weight: bold;
}

/* Temperature color styles */
.temp-normal {
    color: #34c759;
}

.temp-warning {
    color: #ffcc00;
}

.temp-high {
    color: #ff3b30;
}

/* Input Form */
.input-container {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
}

.input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.input-group {
    margin-bottom: 10px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.8rem;
    color: #666;
}

.input-group input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.full-width {
    grid-column: 1 / -1;
}

.test-no-container {
    display: flex;
    align-items: center;
}

.test-no-container input {
    width: 60px;
    text-align: center;
}

.spinner-buttons {
    display: flex;
    flex-direction: column;
    margin: 0 10px;
}

.spinner-btn {
    background: none;
    border: 1px solid #ddd;
    border-radius: 3px;
    width: 20px;
    height: 12px;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    margin: 1px 0;
}

.capture-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    margin-left: auto;
}

/* Chart Containers */
.chart-container {
    height: 250px;
    margin-top: 10px;
}

/* Table Styles */
.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.generate-btn {
    display: flex;
    align-items: center;
    background-color: #f0fff0;
    color: #34c759;
    border: 1px solid #34c759;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
}

.generate-btn svg {
    margin-right: 5px;
}

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background-color: #f8f9fa;
}

th,
td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    font-weight: bold;
    color: #333;
}

tbody tr:hover {
    background-color: #f8f9fa;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.pagination-btn {
    background: none;
    border: 1px solid #ddd;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 3px;
    cursor: pointer;
    border-radius: 4px;
}

.pagination-btn.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

/* Auto-save toggle */
.auto-save-label {
    display: flex;
    align-items: center;
    margin-right: 15px;
    font-size: 14px;
}

.auto-capture {
    background-color: rgba(52, 199, 89, 0.1);
    /* Light green background */
}

.manual-capture {
    background-color: rgba(0, 122, 255, 0.1);
    /* Light blue background */
}

/* General row alignment - mimics .row.align-items-center */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.align-items-center {
    align-items: center !important;
}

/* Margin top utilities - mimics .mt-4 */
.mt-4 {
    margin-top: 1.5rem !important;
}

/* Text alignment - mimics .text-center */
.text-center {
    text-align: center !important;
}

/* Container styling */
.container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

/* Column styling for responsive layout */
.col-lg-6 {
    position: relative;
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
}

@media (min-width: 992px) {
    .col-lg-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Input group styling */
.input-group {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    width: 100%;
}

.input-group>.form-control {
    position: relative;
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
    margin-bottom: 0;
}

/* Form control styling */
.form-control {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

/* Button styling */
.btn {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out,
        border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.btn-outline-secondary {
    color: #6c757d;
    border-color: #6c757d;
    background-color: transparent;
}

.btn-outline-secondary:hover {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}

.btn-primary {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    color: #fff;
    background-color: #0069d9;
    border-color: #0062cc;
}

/* Margin bottom utility - mimics .mb-3 */
.mb-3 {
    margin-bottom: 1rem !important;
}

.button-group {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .col-lg-6 {
        margin-bottom: 1rem;
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .grid-container {
        grid-template-columns: 1fr;
    }

    .metrics-grid {
        grid-template-columns: 1fr 1fr;
    }

    .input-grid {
        grid-template-columns: 1fr;
    }

    .chart-container {
        height: 200px;
    }
}