/* ============================================================
   EVRA Forms – Centralized Modal System
   ============================================================ */

/* ---- Backdrop ---- */
.evra-modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100vw; height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 99999;
  opacity: 0;
  transition: opacity .25s ease;
}
.evra-modal-backdrop.show {
  display: flex;
  opacity: 1;
}

/* ---- Modal box ---- */
.evra-modal {
  background: #fff;
  width: min(560px, 92%);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 100000;
  transform: translateY(16px);
  transition: transform .25s ease;
}
.evra-modal-backdrop.show .evra-modal {
  transform: translateY(0);
}

/* ---- Header ---- */
.evra-modal header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid #eaecf0;
  flex-shrink: 0;
}
.evra-modal header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #0f1e3a;
}
.evra-modal header .evra-modal-close {
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #6b7280;
  transition: color .15s;
}
.evra-modal header .evra-modal-close:hover {
  color: #111;
}

/* ---- Body ---- */
.evra-modal-body {
  padding: 22px;
  overflow-y: auto;
}

/* ---- Form rows ---- */
.evra-form-row {
  margin-bottom: 16px;
}
.evra-form-row label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: #0f1e3a;
  font-size: 14px;
}
.evra-form-row .evra-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color .15s, box-shadow .15s;
}
.evra-form-row .evra-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}
.evra-form-row textarea.evra-input {
  resize: vertical;
  min-height: 80px;
}

/* ---- Checkbox row ---- */
.evra-form-row .evra-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-weight: 400;
  font-size: 13px;
  color: #36415a;
  cursor: pointer;
}
.evra-form-row .evra-checkbox-label input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
}

/* ---- Errors & messages ---- */
.evra-error {
  display: none;
  color: #dc2626;
  font-size: 13px;
  margin-top: 6px;
}
.evra-success {
  display: none;
  color: #16a34a;
  font-weight: 600;
  font-size: 14px;
  margin-top: 10px;
}
.evra-help {
  font-size: 12px;
  color: #6b7280;
  margin-top: 6px;
}

/* ---- Buttons ---- */
.evra-btn-submit {
  display: inline-block;
  padding: 12px 24px;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: background .15s;
}
.evra-btn-submit:hover {
  background: #1d4ed8;
}
.evra-btn-submit:disabled {
  background: #93c5fd;
  cursor: not-allowed;
}

.evra-btn-download {
  display: inline-block;
  padding: 12px 20px;
  background: #16a34a;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: background .15s;
}
.evra-btn-download:hover {
  background: #15803d;
  color: #fff;
  text-decoration: none;
}

/* ---- Product badge in modal ---- */
.evra-product-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eff6ff;
  color: #1e40af;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.evra-product-badge i {
  font-size: 15px;
}

/* ---- Spinner ---- */
.evra-spinner {
  display: none;
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: evra-spin .6s linear infinite;
  margin-left: 8px;
  vertical-align: middle;
}
@keyframes evra-spin {
  to { transform: rotate(360deg); }
}

/* ---- Responsive ---- */
@media (max-width: 576px) {
  .evra-modal {
    width: 96%;
  }
  .evra-modal header {
    padding: 14px 16px;
  }
  .evra-modal-body {
    padding: 16px;
  }
}
