/* ============================================================
   modal.css — Styles for UI Modals and Popups
   ============================================================ */

/* --- Modal Overlay & Container --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal-container {
  background: #fff;
  width: 500px;
  max-width: 90%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.modal-header {
  padding: 12px 16px;
  border-bottom: 1px solid #ddd;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  font-size: 14px;
  background: #f8f9fa;
  border-radius: 4px 4px 0 0;
}

.modal-close {
  cursor: pointer;
  border: none;
  background: transparent;
  font-size: 18px;
  color: #666;
  line-height: 1;
  padding: 0;
}
.modal-close:hover {
  color: #000;
}

.modal-body {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
}

/* --- Generic Form Elements in Modals --- */
.form-group {
  margin-bottom: 12px;
}

.form-group label {
  display: block;
  font-size: 11px;
  margin-bottom: 4px;
  font-weight: bold;
  color: #333;
}

.form-control {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-family: inherit;
  font-size: 12px;
  box-sizing: border-box;
}
.form-control:focus {
  border-color: #4a86e8;
  outline: none;
}

/* --- Search & Action Bar --- */
.modal-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.modal-search {
  width: 70%;
  padding: 6px 8px;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 12px;
}

/* --- Buttons --- */
.btn-primary {
  background: #4a86e8;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 12px;
  font-weight: bold;
}
.btn-primary:hover {
  background: #3b77d9;
}
.btn-secondary {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
  padding: 6px 12px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 12px;
}
.btn-secondary:hover {
  background: #e5e7eb;
}

/* --- List Items (for Picker) --- */
.item-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border: 1px solid #eee;
  border-radius: 3px;
}
.item-list li {
  padding: 10px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.item-list li:last-child {
  border-bottom: none;
}
.item-list li:hover {
  background: #f0f7ff;
}
.item-title {
  font-weight: bold;
  font-size: 13px;
  color: #111;
}
.item-sub {
  font-size: 11px;
  color: #666;
  margin-top: 3px;
}
.item-empty {
  padding: 16px;
  text-align: center;
  color: #888;
  font-size: 12px;
}
