/* Sameiginlegt útlit fyrir modal-glugga á öllum síðum - sjá
   modal-common.js fyrir búnaðinn sem býr þetta til (openModal/closeModal). */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.modal-overlay[hidden] {
  display: none;
}

.modal-panel {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e5e5e5;
}

.modal-title {
  margin: 0;
  font-size: 1.05rem;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: #666;
  padding: 0 0.25rem;
}

.modal-close-btn:hover {
  color: #000;
}

.modal-body {
  padding: 1.25rem;
}

.modal-body label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
}

.modal-body input[type="time"],
.modal-body input[type="text"] {
  width: 100%;
  padding: 0.4rem 0.5rem;
  font-size: 1rem;
  box-sizing: border-box;
  margin-bottom: 0.75rem;
}

.modal-body input[type="color"] {
  display: block;
  width: 3.5rem;
  height: 2.25rem;
  padding: 0.15rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  margin-bottom: 0.75rem;
  cursor: pointer;
}

.modal-body p {
  margin: 0 0 0.75rem;
}

.modal-body .modal-error {
  color: #b3261e;
  margin-top: 0.5rem;
}

/* Forgangs-val (Vinna/Hlé) í "Bæta við tíma"/"Breyta tíma" glugganum á
   Vinnutafla síðunni (sjá work-week.js) - tveir takkar sem virka eins og
   "radio" val í staðinn fyrir droplista, að beiðni notanda. */
.priority-toggle-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.priority-toggle-btn {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  color: #444;
  cursor: pointer;
  font: inherit;
  font-size: 0.95rem;
}

.priority-toggle-btn.priority-toggle-vinna.active {
  background: var(--color-graent-bg);
  border-color: var(--color-graent-border);
  color: #1b5e20;
  font-weight: 600;
}

.priority-toggle-btn.priority-toggle-hle.active {
  background: var(--color-raett-bg);
  border-color: var(--color-raett-border);
  color: #b71c1c;
  font-weight: 600;
}

/* Upphafs-/endatími hlið við hlið (sjá timeRow í work-week.js) - yfirskrifar
   width:100% frá ".modal-body input[type='text']" hér að ofan svo reitirnir
   deili rýminu í staðinn fyrir að hvor um sig taki alla línuna. */
.modal-time-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.modal-time-row input[type="text"] {
  width: 100%;
  margin-bottom: 0;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid #e5e5e5;
}
