/* =========================================================
   Abraa premium contact/chat modal
   Scoped to #chat-registration (Bootstrap + Magnific variants)
   Loaded only on item/list pages, so backdrop tweaks stay local.
   ========================================================= */

/* ---- Overlay: soft dark + blur (both modal systems) ---- */
.modal-backdrop.in,
.modal-backdrop.show {
  background-color: rgba(0, 0, 0, 0.5);
  opacity: 1 !important;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.mfp-bg {
  background: rgba(0, 0, 0, 0.5);
  opacity: 1;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

/* ---- Card container ---- */
.abraa-chat-modal .modal-dialog {
  max-width: 480px;
  margin: 40px auto;
}
.acm-box {
  position: relative;
  max-width: 480px;
  margin: 40px auto;
  padding: 32px;
  background: #ffffff;
  border: 0 none;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  animation: acmIn 0.2s ease-out;
}
.abraa-chat-modal .modal-content.acm-box {
  margin: 0;
}
@keyframes acmIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
/* top gradient accent strip */
.acm-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #5b4bdb 0%, #8b5cf6 50%, #14b8c4 100%);
}

/* ---- Close button ---- */
.acm-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0 none;
  border-radius: 50%;
  background: transparent;
  color: #9aa3ad;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 2;
}
.acm-close:hover {
  background: #f1f3f5;
  color: #4b5563;
}
.acm-close svg {
  width: 18px;
  height: 18px;
}

/* ---- Header ---- */
.acm-header {
  text-align: center;
  margin-bottom: 28px;
}
.acm-icon {
  width: 60px;
  height: 60px;
  margin: 4px auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(140deg, #5b4bdb 0%, #8b5cf6 50%, #14b8c4 100%);
  box-shadow: 0 8px 20px rgba(91, 75, 219, 0.35);
}
.acm-icon svg {
  width: 28px;
  height: 28px;
}
.acm-title {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
  color: #1c2430;
}
.acm-sub {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: #8a929b;
}

/* ---- Fields ---- */
.acm-box .acm-field {
  margin-bottom: 20px;
}
.acm-label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #4b5563;
}
.acm-req {
  color: #f87171;
  font-size: 11px;
}
.acm-input {
  position: relative;
}
.acm-input-ico {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  display: flex;
  color: #9aa3ad;
  pointer-events: none;
}
.acm-input-ico svg {
  width: 18px;
  height: 18px;
}
.acm-box .acm-input .form-control {
  width: 100%;
  height: 48px;
  padding: 0 14px 0 42px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  font-size: 14px;
  color: #1c2430;
  background: #fff;
  box-shadow: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.acm-box .acm-input textarea.form-control {
  height: 110px;
  padding: 12px 14px 12px 42px;
  resize: none;
  line-height: 1.5;
}
.acm-input--area .acm-input-ico {
  top: 15px;
  transform: none;
}
.acm-box .acm-input .form-control::placeholder {
  color: #b6bcc4;
}
.acm-box .acm-input .form-control:focus {
  outline: none;
  border-color: #6a5cff;
  box-shadow: 0 0 0 3px rgba(106, 92, 255, 0.12);
}
.acm-box .acm-input .form-control:disabled {
  background: #f6f7f9;
  color: #6b7280;
}
/* validation states (jQuery validate toggles these classes) */
.acm-box .acm-input .form-control.error {
  border-color: #ef4444;
}
.acm-box .acm-input .form-control.error:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}
.acm-box .acm-input .form-control.valid {
  border-color: #22c55e;
}
.acm-box label.error {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 500;
  color: #ef4444;
}

/* ---- Actions ---- */
.acm-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  border: 0 none;
  padding: 0;
}
.acm-btn-primary {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  border: 0 none;
  border-radius: 10px;
  background: linear-gradient(135deg, #5b4bdb 0%, #8b5cf6 55%, #14b8c4 100%);
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.acm-btn-primary:hover,
.acm-btn-primary:focus {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(91, 75, 219, 0.4);
}
.acm-btn-primary svg {
  width: 18px;
  height: 18px;
}
.acm-btn-ghost {
  flex: 0 0 auto;
  height: 48px;
  padding: 0 20px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: transparent;
  color: #4b5563;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.acm-btn-ghost:hover {
  background: #f1f3f5;
  color: #1c2430;
}

/* ---- Trust line ---- */
.acm-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 18px 0 0;
  font-size: 12px;
  color: #9aa3ad;
}
.acm-trust svg {
  width: 14px;
  height: 14px;
}

/* ---- RTL ---- */
.ar .acm-box,
.pr .acm-box {
  direction: rtl;
}
.ar .acm-close,
.pr .acm-close {
  right: auto;
  left: 16px;
}
.ar .acm-input-ico,
.pr .acm-input-ico {
  left: auto;
  right: 14px;
}
.ar .acm-box .acm-input .form-control,
.pr .acm-box .acm-input .form-control {
  padding: 0 42px 0 14px;
}
.ar .acm-box .acm-input textarea.form-control,
.pr .acm-box .acm-input textarea.form-control {
  padding: 12px 42px 12px 14px;
}
.ar .acm-label,
.pr .acm-label {
  text-align: right;
}

/* ---- Small screens ---- */
@media (max-width: 575px) {
  .acm-box {
    padding: 24px 18px;
  }
  .acm-actions {
    flex-direction: column-reverse;
  }
  .acm-btn-ghost {
    width: 100%;
  }
}
