/* This file contains all the styles for the medication administration component */
/* You can import this file in your main application if you want to use the styles globally */

.medication-details {
  font-size: 14px;
}

.detail-row {
  display: flex;
  margin-bottom: 4px;
}

.detail-label {
  font-weight: bold;
  width: 120px;
}

.detail-value {
  flex: 1;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  padding: 1rem;
}

.details-box {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1rem;
}

.details-box h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: #333;
  font-size: 1.1rem;
}

.details-content {
  margin-bottom: 1rem;
}

.edit-link {
  text-align: right;
}

.edit {
  color: #0066cc;
  text-decoration: none;
}

.edit:hover {
  text-decoration: underline;
}

/* Existing styles from style.css */
.table-container {
  margin: 20px auto;
  width: 90%;
  overflow-x: auto;
}

.schedule-table {
  width: 100%;
  border-collapse: collapse;
  background-color: white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.schedule-table th,
.schedule-table td {
  border: 1px solid #ddd;
  padding: 12px;
  text-align: center;
}

.schedule-table th {
  background-color: #f8f9fa;
  font-weight: normal;
  position: sticky;
  top: 0;
  z-index: 1;
}

.schedule-table td:first-child {
  text-align: left;
  width: 300px;
  white-space: pre-line;
}

.schedule-table td:nth-child(2) {
  width: 150px;
}

.schedule-table td:nth-child(3) {
  width: 100px;
}

.schedule-table td[data-date] {
  width: 80px;
}

.date-picker-popup {
  padding: 10px;
  background-color: white;
  border: 1px solid #ccc;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  z-index: 1000;
}

.date-picker-popup label {
  display: block;
  margin-bottom: 5px;
}

.date-picker-popup input {
  margin-bottom: 10px;
}

.date-picker-popup button {
  padding: 6px 12px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.footer-buttons {
  margin: 20px 0;
}

.footer-buttons button {
  margin: 0 5px;
  padding: 8px 16px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.footer-buttons button:hover {
  background-color: #0056b3;
}

.popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
}

.popup-content {
  background-color: white;
  padding: 20px;
  border-radius: 5px;
  width: 300px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.popup-content h3 {
  margin-top: 0;
}

.popup-content button {
  margin: 0 10px;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
  flex: 1;
}

.popup-content .taken {
  background-color: #28a745;
  color: white;
}

.popup-content .take-later {
  background-color: #ffc107;
  color: black;
}

.popup-content .refused {
  background-color: #dc3545;
  color: white;
}

.popup-btn {
  margin: 5px;
  padding: 8px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  color: white;
  width: 80%;
}

.popup-btn.taken {
  background-color: #28a745;
}

.popup-btn.refused {
  background-color: #dc3545;
}

.popup-btn.take-later {
  background-color: #ffc107;
  color: black;
}

.time-entry {
  cursor: pointer;
  padding: 5px;
}

hr {
  border: none;
  border-top: 1px solid #ddd;
  margin: 5px 0;
}

.time-slot {
  min-height: 30px;
  width: 100%;
}

.date-cell {
  padding: 0 !important;
}

.flatpickr-calendar {
  font-family: Arial, sans-serif;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.flatpickr-day.selected {
  background-color: #007bff;
  color: white;
}

.flatpickr-day.startRange, .flatpickr-day.endRange {
  background-color: #0056b3;
  color: white;
}

.hold-options, .change-options {
  display: none;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.hold-options label, .change-options label {
  display: block;
  margin: 5px 0;
}

.hold-options input, .change-options input,
.hold-options select, .change-options select,
.hold-options textarea, .change-options textarea {
  width: 100%;
  padding: 5px;
  margin: 5px 0;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.hold-options button, .change-options button {
  margin-top: 10px;
  padding: 5px 10px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.hold-text {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #666;
}

.button-row {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

/* Color codes for Administration Dates */
.active-cell {
  background-color: #d4edda; /* Active */
}

.discontinued-cell {
  background-color: #f8d7da; /* Discontinued */
}

.hold-cell {
  background-color: #fff3cd; /* Hold */
}

.new-cell {
  background-color: #869ccd; /* New */
}

.pending-cell {
  background-color: #bf86cd; /* Pending */
}

/* Default row color for Active status */
.active-row {
  background-color: #d4edda; /* Active */
}

/* Change row color based on status */
.medication-row.discontinued-row {
  background-color: #f8d7da; /* Discontinued */
}

.medication-row.new-row {
  background-color: #869ccd; /* New */
}

.medication-row.hold-row {
  background-color: #fff3cd; /* Hold */
}

.medication-row.pending-row {
  background-color: #bf86cd; /* Pending */
}

.medication-row.active-row {
  background-color: #d4edda; /* Active */
}