/* css/clinical-tables.css */
body {
    font-family: 'Inter', sans-serif;
    background-color: #f7f9fc;
    padding: 20px;
}

.clinical-table-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    padding: 20px;
    margin-top: 20px;
}

.section-header {
    margin-bottom: 20px;
}

.title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    display: block;
}

.table-controls {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 20px;
}

.btn-add {
    background: #4a90e2;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s ease;
}

.btn-add:hover {
    background: #357abd;
}

.btn-add i {
    margin-right: 6px;
}

.btn-remove {
    background: #e74c3c;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s ease;
}

.btn-remove:hover {
    background: #c0392b;
}

.btn-remove i {
    margin-right: 6px;
}

.btn-delete {
    background: #f8f9fa;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #e74c3c;
    transition: background 0.2s ease, color 0.2s ease;
}

.btn-delete:hover:not(:disabled) {
    background: #e74c3c;
    color: #fff;
}

.btn-delete:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

.table thead th {
    background: #3c8dbc;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    padding: 12px 16px;
    border-bottom: 2px solid #e0e4e8;
}

.table td {
    padding: 12px 16px;
    vertical-align: middle;
    border-bottom: 1px solid #e0e4e8;
}

.table tr:hover {
    background: #fafcff;
}

.form-control {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
    outline: none;
}

.checkbox-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

.form-checkbox {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1px solid #d1d5db;
    cursor: pointer;
    appearance: none;
    background-color: #fff;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.form-checkbox:checked {
    background-color: #4a90e2;
    border-color: #4a90e2;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: 14px;
    background-position: center;
    background-repeat: no-repeat;
}

.new-row {
    animation: highlightRow 1.5s ease-out;
}

@keyframes highlightRow {
    0% {
        background: #e6f0fa;
    }

    100% {
        background: transparent;
    }
}

.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.modal-header {
    border-bottom: none;
    padding: 16px 20px;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.modal-body {
    padding: 20px;
}

.alert-warning {
    background: #fff3e0;
    border: 1px solid #ffcc80;
    color: #e65100;
    border-radius: 8px;
    padding: 12px;
}

.modal-footer {
    border-top: none;
    padding: 16px 20px;
}

.btn-outline {
    background: transparent;
    border: 1px solid #d1d5db;
    color: #333;
    padding: 8px 16px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.btn-outline:hover {
    background: #f1f4f8;
}

.btn-primary {
    background: #4a90e2;
    border: none;
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.btn-primary:hover {
    background: #357abd;
}

@media (max-width: 767px) {
    .table-responsive {
        overflow-x: auto;
    }

    .table-controls {
        flex-direction: column;
        gap: 10px;
    }

    .btn-add,
    .btn-remove {
        width: 100%;
    }
}

/* Modal No Data Options Styles */
.no-data-options {
    margin-top: 15px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.no-data-fields {
    margin-top: 10px;
}

.no-data-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 14px;
    color: #495057;
    cursor: pointer;
    user-select: none;
    font-weight: 400;
}

.modal-no-data-checkbox {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
    accent-color: #4a90e2;
}

.no-data-text {
    cursor: pointer;
    margin: 0;
    color: #495057;
}

.no-data-label:hover .no-data-text {
    color: #4a90e2;
}

.modal-no-data-checkbox:checked + .no-data-text {
    color: #4a90e2;
    font-weight: 500;
}

/* Alert styling for no-data info */
.alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
    margin-bottom: 10px;
}

/* Responsive adjustments for modal no-data options */
@media (max-width: 768px) {
    .no-data-label {
        font-size: 13px;
        gap: 6px;
    }
    
    .modal-no-data-checkbox {
        width: 14px;
        height: 14px;
    }
    
    .no-data-options {
        padding: 12px;
    }
}