/* Global site styles (project-specific) */

/* Global table font sizing for consistency across pages
   Ensure both Scheme Configuration and Communication tables use same font size */
.table.table-striped.mb-0,
.table.table-hover.mb-0,
.modern-table {
    font-size: 0.95rem; /* adjust as needed: 0.95rem ~15px on default 16px root */
}

/* Optional: reduce line-height for dense tables */
.table.table-striped.mb-0 td,
.table.table-striped.mb-0 th,
.table.table-hover.mb-0 td,
.table.table-hover.mb-0 th,
.modern-table td,
.modern-table th {
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
}

.modern-toast {
    min-width: 320px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
    background: #fff;
}

.modern-toast .toast-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.form-error-text {
    color: #b91c1c;
    font-size: 0.86rem;
    margin-top: 0.35rem;
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 .2rem rgba(239, 68, 68, 0.15);
}

.modal-overlay {
    background-color: rgba(0, 0, 0, 0.5);
}

.page-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    flex-wrap: wrap;
}

.log-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.log-detail-cell {
    word-break: break-all;
    overflow-wrap: anywhere;
}

.comm-log-content {
    font-family: Consolas, "Cascadia Mono", "Courier New", monospace;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.35;
}

.comm-log-list {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.comm-log-card {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: .75rem;
    background: #fff;
}

.comm-log-meta {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: .5rem .9rem;
}

.comm-log-meta-item {
    min-width: 0;
}

.comm-log-meta-label {
    color: #64748b;
    font-size: .8rem;
    margin-bottom: .1rem;
}

.empty-state-container {
    padding: .5rem;
}

.empty-state-message {
    font-size: .95rem;
}

@media (max-width: 768px) {
    .page-header-bar {
        align-items: stretch;
    }

    .page-header-bar .btn {
        width: 100%;
    }

    .serial-port-group {
        flex-wrap: wrap;
    }

    .serial-port-group .serial-refresh-btn {
        width: 100%;
    }

    .comm-log-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 769px) and (max-width: 1200px) {
    .comm-log-meta {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

