/* =============================================================
   SHA Construction — Global Modern Modal & Form Styles
   Loaded via AppAsset → applies to every modal in the system.
   Overrides Bootstrap 3 defaults for an international-grade UI.
   ============================================================= */

/* ── Modal shell ─────────────────────────────────────────────── */
.modal-content {
  border: none !important;
  border-radius: 14px !important;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.18) !important;
  overflow: hidden;
}

/* ── Modal header ────────────────────────────────────────────── */
.modal-header {
  background: #ffffff !important;
  border-bottom: 1px solid #efefef !important;
  padding: 20px 26px 16px !important;
  position: relative;
}

/* Accent bar on the left */
.modal-header::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #462e82 0%, #7c4dbd 100%);
  border-radius: 14px 0 0 0;
}

.modal-header h4,
.modal-header .modal-title,
.modal-header span.public_user {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #1a1a2e !important;
  letter-spacing: 0.2px;
  font-family: inherit;
}

.modal-header .close {
  opacity: 0.5 !important;
  font-size: 22px !important;
  margin-top: 0 !important;
  color: #333 !important;
  transition: opacity 0.15s;
}
.modal-header .close:hover { opacity: 1 !important; }

/* ── Modal body ──────────────────────────────────────────────── */
.modal-body {
  padding: 24px 26px !important;
  background: #ffffff;
}

/* ── Modal footer ────────────────────────────────────────────── */
.modal-footer {
  background: #f9f9fc !important;
  border-top: 1px solid #efefef !important;
  padding: 14px 26px !important;
  border-radius: 0 0 14px 14px !important;
}

/* ── Form labels (inside modal & .client-form) ───────────────── */
.modal-body label,
.modal-body .control-label,
.client-form label,
.client-form .control-label,
.form-vertical label,
.form-vertical .control-label {
  font-size: 11.5px !important;
  font-weight: 600 !important;
  color: #6b7280 !important;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 5px !important;
  display: block;
}

/* ── Text inputs ─────────────────────────────────────────────── */
.modal-body .form-control,
.client-form .form-control,
.form-vertical .form-control {
  height: 40px !important;
  border: 1.5px solid #e5e7eb !important;
  border-radius: 8px !important;
  font-size: 13.5px !important;
  color: #111827 !important;
  padding: 8px 13px !important;
  background: #fff !important;
  box-shadow: none !important;
  transition: border-color 0.18s ease, box-shadow 0.18s ease !important;
}
.modal-body .form-control:focus,
.client-form .form-control:focus {
  border-color: #7c4dbd !important;
  box-shadow: 0 0 0 3px rgba(124, 77, 189, 0.12) !important;
  outline: none !important;
}
.modal-body .form-control::placeholder,
.client-form .form-control::placeholder {
  color: #b0b7c3 !important;
  font-size: 13px !important;
}

/* ── Input group (country code + phone, search boxes) ───────── */
.input-group .input-group-addon {
  background: #f5f3ff !important;
  border: 1.5px solid #e5e7eb !important;
  border-right: none !important;
  border-radius: 8px 0 0 8px !important;
  color: #462e82 !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  padding: 0 11px !important;
  min-width: 36px;
  text-align: center;
}
.input-group .form-control:last-child,
.input-group .form-control:not(:first-child) {
  border-radius: 0 8px 8px 0 !important;
  border-left: none !important;
}
.input-group .form-control:not(:last-child) {
  border-radius: 0 !important;
  border-left: none !important;
  border-right: none !important;
}

/* ── Inline two-input WhatsApp row ───────────────────────────── */
.wa-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.wa-country-wrap {
  display: flex;
  align-items: center;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  width: 90px;
  flex-shrink: 0;
  background: #f5f3ff;
}
.wa-country-wrap .wa-plus {
  padding: 0 8px;
  font-weight: 700;
  font-size: 14px;
  color: #462e82;
  background: #f5f3ff;
  line-height: 40px;
  height: 40px;
}
.wa-country-wrap input {
  border: none !important;
  outline: none !important;
  width: 42px;
  height: 40px;
  text-align: center;
  font-size: 13.5px;
  font-weight: 600;
  color: #111827;
  background: #fff;
  padding: 0 6px;
  box-shadow: none !important;
  border-radius: 0 8px 8px 0 !important;
  border-left: 1px solid #e5e7eb !important;
}
.wa-mobile-input {
  flex: 1;
}
.wa-hint {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 5px;
}

/* ── Buttons ─────────────────────────────────────────────────── */
/* Primary / Submit / Update */
.btn-success,
.btn-primary {
  background: linear-gradient(135deg, #462e82 0%, #7c4dbd 100%) !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 9px 24px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: 0.3px !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(70, 46, 130, 0.28) !important;
  transition: all 0.18s ease !important;
}
.btn-success:hover,
.btn-primary:hover,
.btn-success:focus,
.btn-primary:focus {
  transform: translateY(-1px) !important;
  box-shadow: 0 5px 15px rgba(70, 46, 130, 0.38) !important;
}
.btn-success:active,
.btn-primary:active {
  transform: translateY(0) !important;
}

/* Cancel / Default */
.btn-cancel,
.btn-default {
  background: #ffffff !important;
  border: 1.5px solid #e5e7eb !important;
  border-radius: 8px !important;
  color: #6b7280 !important;
  padding: 9px 24px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  transition: all 0.15s ease !important;
}
.btn-cancel:hover,
.btn-default:hover {
  background: #f5f3ff !important;
  border-color: #c4b5fd !important;
  color: #462e82 !important;
}

/* ── Confirmation mini-modal ─────────────────────────────────── */
#mi-modal.modal { z-index: 1060 !important; }
#mi-modal .modal-dialog {
  max-width: 380px !important;
  width: 380px !important;
  margin: 90px auto !important;
}
#mi-modal .modal-body p {
  font-size: 14px;
  color: #374151;
  line-height: 1.6;
  margin: 0;
}
#mi-modal .modal-header { padding: 16px 20px 14px !important; }
#mi-modal .modal-footer { padding: 12px 20px !important; }
#mi-modal .btn { min-width: 80px; }

/* ── Row & column spacing ────────────────────────────────────── */
.client-form .row { margin-bottom: 6px; }
.client-form .col-md-4,
.client-form .col-md-6 { padding-bottom: 4px; }

/* ── Error / help text ───────────────────────────────────────── */
.help-block { font-size: 11px !important; color: #ef4444 !important; margin-top: 3px !important; }
.error-msg1  { font-size: 11px !important; color: #ef4444 !important; }

/* ── Overlay ─────────────────────────────────────────────────── */
.modal-backdrop.in { opacity: 0.4 !important; }

/* ── Smooth modal animation ──────────────────────────────────── */
.modal.fade .modal-dialog {
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.22s ease !important;
  transform: scale(0.95) translateY(-10px) !important;
}
.modal.in .modal-dialog {
  transform: scale(1) translateY(0) !important;
}
