/* displayPatientTests.css */
.patient-tests-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    overflow: auto;
}

.patient-tests-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    overflow: auto;
    box-sizing: border-box;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.patient-tests-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.patient-tests-title {
    margin: 0;
    color: #333;
}

.patient-tests-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.patient-tests-close-btn:hover {
    color: #333;
}

.patient-tests-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.patient-tests-search {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.patient-tests-toggle-btn {
    margin-bottom: 10px;
}

.patient-tests-checkboxes {
    display: none;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px;
    background-color: #f5f5f5;
    border-radius: 4px;
}

.patient-tests-checkbox-label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.patient-tests-table-container {
    overflow-x: auto;
    max-height: 70vh;
}

.patient-tests-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.patient-tests-table th {
    padding: 12px 8px;
    text-align: left;
    border-bottom: 2px solid #ddd;
    background-color: #f5f5f5;
}

.patient-tests-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #eee;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.patient-tests-table tr:hover {
    background-color: #f9f9f9;
}

.patient-tests-action-btn {
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    cursor: pointer;
    margin-right: 5px;
}

.patient-tests-view-btn {
    background-color: #17a2b8;
    color: white;
}

.patient-tests-view-btn:hover {
    background-color: #148ea1;
}

.patient-tests-ecg-btn {
    background-color: #ffc107;
    color: black;
}

.patient-tests-ecg-btn:hover {
    background-color: orange;
}

.patient-tests-meta {
    margin-top: 15px;
    text-align: right;
    font-size: 0.9em;
    color: #666;
}

.patient-tests-success {
    color: green;
}

.patient-tests-failure {
    color: red;
    font-weight: bold;
}

/* Мобільна версія (екрани менше 768px) */
@media (max-width: 767px) {
    .patient-tests-content {
        width: 95%;
        padding: 15px;
    }
    
    .patient-tests-card {
        border: 1px solid #ddd;
        border-radius: 8px;
        padding: 15px;
        margin-bottom: 15px;
        background-color: #f9f9f9;
    }
    
    .patient-tests-card-field {
        display: flex;
        justify-content: space-between;
        margin-bottom: 8px;
    }
    
    .patient-tests-card-label {
        font-weight: bold;
        min-width: 100px;
    }
    
    .patient-tests-card-value {
        text-align: right;
        flex-grow: 1;
    }
    
    .patient-tests-card-actions {
        display: flex;
        flex-direction: column;
        gap: 8px;
        margin-top: 15px;
    }
    
    .patient-tests-action-btn {
        width: 100%;
        margin-right: 0;
    }
    
    /* Приховати таблицю на малих екранах */
    .patient-tests-table-container {
        display: none;
    }
    
    /* Показати картки на малих екранах */
    .patient-tests-cards-container {
        display: block;
    }
}

/* Десктопна версія (екрани 768px і більше) */
@media (min-width: 768px) {
    .patient-tests-cards-container {
        display: none;
    }
    
    .patient-tests-table-container {
        display: block;
    }
}

/* Додаткові стилі для карток (загальні) */
.patient-tests-cards-container {
    display: none; /* Початково приховано */
    margin-top: 15px;
}

.patient-tests-card-status {
    font-weight: bold;
}

.patient-tests-card-status.success {
    color: green;
}

.patient-tests-card-status.failure {
    color: red;
}