/**
 * The Admin Modal Styles file.
 *
 * This includes all of the styles used by the plugin's Admin pages as a replacement for Bootstrap.
 *
 * @link              https://billiworx.com
 * @since             1.0.0
 * @package           BilliWorx-Core
 * @subpackage        src\core-features\bca\css
 * @author            Nigel Billingham <nigel@billiworx.com>
 */

body.modal-open {
  overflow: hidden;
}

/* Modal */

.modal {
  position: fixed;
  inset: 0;

  z-index: 1050;

  display: none;

  overflow-x: hidden;
  overflow-y: auto;

  outline: 0;
}

.modal.show {
  display: block;
}

/* Fade animation */

.modal.fade {
  opacity: 0;
  transition: opacity 0.15s linear;
}

.modal.fade.show {
  opacity: 1;
}

/* Dialog */

.modal-dialog {
  position: relative;

  width: auto;
  max-width: 800px;

  margin: 1.75rem auto;

  pointer-events: none;
}

/* XL */

.modal-xl {
  max-width: 1140px;
}

/* Content */

.modal-content {
  position: relative;

  display: flex;
  flex-direction: column;

  width: 100%;

  background-color: #fff;

  border: 1px solid rgba(0,0,0,.2);
  border-radius: 0.5rem;

  box-shadow:
    0 0.5rem 1rem rgba(0,0,0,.15);

  pointer-events: auto;
}

/* Header */

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 1rem;

  border-bottom: 1px solid #dee2e6;
}

/* Title */

.modal-title {
  margin: 0;

  font-size: 1.25rem;
  font-weight: 600;
}

/* Body */

.modal-body {
  position: relative;
  flex: 1 1 auto;

  padding: 1rem;
}

/* Scrollable body */

.modal-dialog-scrollable .modal-body {
  max-height: calc(100vh - 210px);
  overflow-y: auto;
}

/* Footer */

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;

  padding: 1rem;

  border-top: 1px solid #dee2e6;
}

/* -------------------------------- */
/* Backdrop                         */
/* -------------------------------- */

.modal-backdrop {
  position: fixed;
  inset: 0;

  z-index: 1040;

  background: #000;

  opacity: 0;
}

.modal-backdrop.fade {
  transition: opacity 0.15s linear;
}

.modal-backdrop.show {
  opacity: 0.5;
}

/* -------------------------------- */
/* Buttons                          */
/* -------------------------------- */

.btn {
  display: inline-block;

  padding: 0.375rem 0.75rem;

  border: 1px solid transparent;
  border-radius: 0.375rem;

  font-size: 0.875rem;

  cursor: pointer;
}

.btn-secondary {
  background: #6c757d;
  border-color: #6c757d;
  color: #fff;
}

.btn-secondary:hover {
  background: #5c636a;
}

/* Close button */

.btn-close {
  width: 1.5rem;
  height: 1.5rem;

  padding: 0;

  border: 0;

  background: transparent;

  cursor: pointer;
}

.btn-close::before {
  content: "✕";

  display: block;

  font-size: 1rem;
  line-height: 1;

  color: #666;
}

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