/**
 * Admin Modals Unified - Round corners, nice buttons, consistent design
 * Applies to all modal cards across the platform (Add Staff Note style)
 */

/* Modal content - round corners, shadow */
.modal .modal-content {
  border-radius: 16px !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12) !important;
  border: 1px solid #e5e7eb !important;
}

/* Modal header */
.modal .modal-header {
  padding: 1rem 1.25rem !important;
  border-bottom: 1px solid #e5e7eb !important;
  background: #f9fafb !important;
  border-top-left-radius: 15px !important;
  border-top-right-radius: 15px !important;
}
.modal .modal-title {
  font-size: 1.1rem !important;
  font-weight: 600 !important;
  color: #1f2937 !important;
}
.modal .modal-header .btn-close {
  opacity: 0.7;
}
.modal .modal-header .btn-close:hover {
  opacity: 1;
}

/* Modal body */
.modal .modal-body {
  padding: 1.25rem !important;
  background: #fff !important;
}

/* Modal footer - consistent padding and layout */
.modal .modal-footer {
  padding: 1rem 1.25rem !important;
  border-top: 1px solid #e5e7eb !important;
  background: #f9fafb !important;
  border-bottom-left-radius: 15px !important;
  border-bottom-right-radius: 15px !important;
  gap: 0.5rem !important;
}

/* Primary button in modal footer - blue gradient (Save, Submit, Add) - match Add Staff Note */
.modal .modal-footer .btn-primary {
  min-width: 110px !important;
  height: 40px !important;
  min-height: 40px !important;
  padding: 0.55rem 1.75rem !important;
  line-height: 1.3 !important;
  border-radius: 10px !important;
  font-weight: 500 !important;
  background: linear-gradient(135deg, #1f2b3a 0%, #364a63 100%) !important;
  background-color: #1f2b3a !important;
  border: 2px solid #364a63 !important;
  box-shadow: 0 4px 15px rgba(31, 43, 58, 0.3) !important;
  color: #fff !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s ease !important;
}
.modal .modal-footer .btn-primary:hover {
  background: linear-gradient(135deg, #364a63 0%, #4a6282 100%) !important;
  border-color: #4a6282 !important;
  box-shadow: 0 4px 20px rgba(54, 74, 99, 0.35) !important;
  color: #fff !important;
}
.modal .modal-footer .btn-primary i {
  color: inherit !important;
}

/* Secondary / Cancel button in modal footer */
.modal .modal-footer .btn-secondary {
  min-width: 110px !important;
  height: 40px !important;
  min-height: 40px !important;
  padding: 0.55rem 1.75rem !important;
  line-height: 1.3 !important;
  border-radius: 10px !important;
  font-weight: 500 !important;
  background: #f1f4fb !important;
  border: 1px solid #c9d2e3 !important;
  color: #202938 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s ease !important;
}
.modal .modal-footer .btn-secondary:hover {
  background: #e5ebf7 !important;
  border-color: #9ca3af !important;
  color: #1f2937 !important;
}

/* Close / btn-link in modal footer - style as Cancel (same as Add Staff Note) */
.modal .modal-footer .btn-link {
  min-width: 110px !important;
  height: 40px !important;
  min-height: 40px !important;
  padding: 0.55rem 1.75rem !important;
  line-height: 1.3 !important;
  border-radius: 10px !important;
  font-weight: 500 !important;
  background: #f1f4fb !important;
  border: 1px solid #c9d2e3 !important;
  color: #202938 !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s ease !important;
}
.modal .modal-footer .btn-link:hover {
  background: #e5ebf7 !important;
  border-color: #9ca3af !important;
  color: #1f2937 !important;
}

/* Form controls in modals - round corners */
.modal .form-control,
.modal .form-select,
.modal input[type="text"],
.modal input[type="email"],
.modal input[type="number"],
.modal textarea.form-control {
  border-radius: 10px !important;
  border: 1px solid #d1d5db !important;
  padding: 0.5rem 0.75rem !important;
}
.modal .form-control:focus,
.modal .form-select:focus {
  border-color: #364a63 !important;
  box-shadow: 0 0 0 3px rgba(54, 74, 99, 0.15) !important;
}

/* Radio toggle buttons (btn-group-toggle) in modals */
.modal .btn-group-toggle.bg-light .btn,
.modal .field-radio .btn-group .btn {
  border-radius: 10px !important;
  padding: 0.4rem 1rem !important;
  font-size: 0.9rem !important;
  border: 1px solid #d1d5db !important;
}
.modal .btn-group-toggle.bg-light .btn-check:checked + .btn,
.modal .field-radio .btn-group .btn-check:checked + .btn {
  background: #364a63 !important;
  border-color: #364a63 !important;
  color: #fff !important;
}

/* Add item buttons in repeaters */
.modal [data-control="add-item"].btn-primary,
.modal .list-action .btn-primary[data-control="add-item"] {
  border-radius: 10px !important;
  padding: 0.5rem 1rem !important;
  font-weight: 500 !important;
  background: linear-gradient(135deg, #1f2b3a 0%, #364a63 100%) !important;
  border: 2px solid #364a63 !important;
  color: #fff !important;
}
.modal [data-control="add-item"].btn-primary:hover {
  background: linear-gradient(135deg, #364a63 0%, #4a6282 100%) !important;
  border-color: #4a6282 !important;
  color: #fff !important;
}

/* Danger/Remove buttons in modals */
.modal .btn-outline-danger,
.modal .btn-danger {
  border-radius: 8px !important;
}

/* Input groups in modals */
.modal .input-group .form-control,
.modal .input-group .input-group-text {
  border-radius: 10px !important;
}
.modal .input-group .input-group-text {
  border-color: #d1d5db !important;
  background: #f9fafb !important;
}
