/* public/assets/css/modal.css */

.demo-modal[hidden] { display: none !important; }

.demo-modal{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 18px;
}

.demo-modal__overlay{
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(4px);
}

.demo-modal__panel{
  position: relative;
  width: min(640px, 100%);
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 25px 70px rgba(15, 23, 42, 0.22);
  padding: 22px 22px 18px;
}

.demo-modal__close{
  position: absolute;
  top: 10px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: rgba(15, 23, 42, 0.04);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.demo-modal__title{
  margin: 6px 0 6px;
  font-size: 24px;
  line-height: 1.2;
}

.demo-modal__lead{
  margin: 0 0 14px;
  opacity: 0.85;
}

.demo-modal__alert{
  border-radius: 14px;
  padding: 10px 12px;
  margin: 0 0 12px;
  font-size: 16px;
}

.demo-modal__alert--error{
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.18);
}

.demo-modal__alert--success{
  background: rgba(22, 163, 74, 0.08);
  border: 1px solid rgba(22, 163, 74, 0.18);
}

.demo-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 8px 0 14px;
}

.demo-field{
  display: grid;
  gap: 6px;
}

.demo-field--full{
  grid-column: 1 / -1;
}

.demo-field__label{
  font-size: 16px;
  opacity: 0.85;
}

.demo-field__input{
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  padding: 12px 12px;
  font-size: 18px;
  outline: none;
  background: #fff;
}

.demo-field__input:focus{
  border-color: rgba(234, 88, 12, 0.55);
  box-shadow: 0 0 0 4px rgba(234, 88, 12, 0.12);
}

.demo-modal__actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 10px;
}

.demo-modal__fine{
  margin: 12px 0 0;
  font-size: 16px;
  opacity: 0.75;
}

@media (max-width: 520px){
  .demo-grid{ grid-template-columns: 1fr; }
  .demo-field--full{ grid-column: auto; }
}

/* stop scroll when modal open */
body.is-modal-open{
  overflow: hidden;
}
