/* Reusable Modal Styles */

/* Standard Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-content {
  background-color: var(--background-color);
  padding: 32px;
  border: 2px solid var(--accent-color);
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.modal-content h2 {
  font-size: 24px;
  font-weight: 700;
  color: #000000; /* Text always stays black */
  margin-bottom: 20px;
}

.modal-close {
  color: #000000; /* Text always stays black */
  float: right;
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: #666666;
}

/* Modal Overlay (for confirmation modals) */
.modal-overlay {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay .modal-content {
  background-color: #ffffff; /* Card backgrounds always stay white */
  padding: 32px;
  border: 2px solid var(--accent-color);
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.modal-actions button {
  flex: 1;
  min-width: 120px;
}

/* Form elements in modals */
.modal-content .form-group {
  margin-bottom: 20px;
}

.modal-content .form-group label {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: #000000; /* Text always stays black */
  margin-bottom: 8px;
}

.modal-content .form-input {
  width: 100%;
  padding: 12px;
  font-size: 18px;
  font-family: 'Playfair Display', 'Libre Baskerville', 'Georgia', 'Times New Roman', 'Times', serif;
  border: 2px solid var(--accent-color);
  border-radius: 4px;
  box-sizing: border-box;
  min-height: 44px;
}

.modal-content .form-input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.modal-content .form-input textarea {
  min-height: 120px;
  resize: vertical;
}

/* Click outside to close */
.modal[style*="flex"],
.modal-overlay[style*="flex"] {
  display: flex !important;
}

