/* ============================================
   EASI Contact Form Styling
   ONE white card — fields + captcha + submit
   Brand: EASI Blue #1B3A6B / Gold #FFD700 / Inputs #f6f8f9
   ============================================ */

/* ── THE ONE CARD (outer wrapper) ── */
.crmEntityFormView,
#EntityFormPanel {
  max-width: 800px !important;
  margin: 40px auto !important;
  padding: 45px 50px !important;
  background: #ffffff !important;
  background-color: #ffffff !important;
  border-radius: 16px !important;
  box-shadow: 0 8px 32px rgba(27, 58, 107, 0.12) !important;
  border: 1px solid rgba(27, 58, 107, 0.08) !important;
  font-family: 'Segoe UI', Arial, Helvetica, sans-serif !important;
}

/* ── STRIP INNER FORM CARD STYLING ── */
.crmEntityFormView .entity-form,
.crmEntityFormView > div.entity-form,
.entity-form,
[id$="_EntityFormView"] {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  max-width: none !important;
}

/* ── STRIP NESTED WRAPPERS (panels, fieldsets, table backgrounds) ── */
.crmEntityFormView .panel,
.crmEntityFormView .panel-default,
.crmEntityFormView .panel-body,
.crmEntityFormView .panel-heading,
.crmEntityFormView .panel-footer,
.crmEntityFormView .well,
.crmEntityFormView .card,
.crmEntityFormView fieldset,
.crmEntityFormView .tab,
.crmEntityFormView .tab-column,
.crmEntityFormView table.section,
.crmEntityFormView table.section tbody,
.crmEntityFormView .section,
.crmEntityFormView .cell,
.crmEntityFormView .tr,
.crmEntityFormView .captcha-cell,
.crmEntityFormView .RadCaptcha {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  border: none !important;
  border-radius: 0 !important;
}

/* ── LABELS ── */
.crmEntityFormView .field-label,
.crmEntityFormView label,
.crmEntityFormView .control-label {
  color: #1B3A6B !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  margin-bottom: 8px !important;
  letter-spacing: 0.2px !important;
}

/* ── REQUIRED ASTERISK ── */
.crmEntityFormView .info.required .field-label::after {
  content: " *";
  color: #d9534f;
  font-weight: 700;
}

/* ── INPUT FIELDS (gray boxes) ── */
.crmEntityFormView input[type="text"],
.crmEntityFormView input[type="email"],
.crmEntityFormView input[type="tel"],
.crmEntityFormView input[type="url"],
.crmEntityFormView input[type="number"],
.crmEntityFormView input[type="date"],
.crmEntityFormView input[type="datetime-local"],
.crmEntityFormView input[type="password"],
.crmEntityFormView input.text,
.crmEntityFormView textarea,
.crmEntityFormView textarea.textarea,
.crmEntityFormView select,
.crmEntityFormView select.picklist,
.crmEntityFormView .form-control {
  width: 100% !important;
  border: 1px solid #e1e5ec !important;
  border-radius: 8px !important;
  padding: 12px 14px !important;
  font-size: 14px !important;
  color: #1B3A6B !important;
  background: #f6f8f9 !important;
  background-color: #f6f8f9 !important;
  box-shadow: none !important;
  text-decoration: none !important;
  transition: border-color 0.2s, box-shadow 0.2s !important;
}

/* ── FIX FOR EMAIL FIELD UNDERLINE (inline style override) ── */
.crmEntityFormView input[type="email"] {
  text-decoration: none !important;
}

/* ── INPUT FOCUS ── */
.crmEntityFormView input:focus,
.crmEntityFormView textarea:focus,
.crmEntityFormView select:focus,
.crmEntityFormView .form-control:focus {
  border-color: #FFD700 !important;
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.25) !important;
  background-color: #f6f8f9 !important;
  outline: none !important;
}

/* ── TEXTAREA ── */
.crmEntityFormView textarea {
  min-height: 140px !important;
  resize: vertical !important;
}

/* ── PLACEHOLDER ── */
.crmEntityFormView input::placeholder,
.crmEntityFormView textarea::placeholder {
  color: #94a3b8 !important;
  font-style: italic !important;
}

/* ── TABLE LAYOUT SPACING ── */
.crmEntityFormView table.section {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 12px !important;
}

.crmEntityFormView table.section .cell {
  padding: 6px 8px !important;
  vertical-align: top !important;
}

.crmEntityFormView .info {
  margin-bottom: 6px !important;
}

.crmEntityFormView .control {
  margin-bottom: 0 !important;
}

/* ── HIDE SPACER CELLS ── */
.crmEntityFormView .zero-cell {
  display: none !important;
}

/* ── CAPTCHA ── */
.crmEntityFormView .captcha-cell,
.crmEntityFormView .RadCaptcha {
  margin: 20px 0 25px 0 !important;
  padding: 0 !important;
}

.crmEntityFormView .RadCaptcha img {
  border-radius: 6px !important;
  border: 1px solid #e1e5ec !important;
}

.crmEntityFormView .RadCaptcha input[type="text"] {
  max-width: 220px !important;
  margin-top: 8px !important;
}

/* ── ACTIONS / BUTTON ROW (transparent, button sits below captcha) ── */
.crmEntityFormView .actions,
.crmEntityFormView .form-actions,
.crmEntityFormView .entity-form-actions {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  border: none !important;
  padding: 0 !important;
  margin-top: 15px !important;
  text-align: left !important;
}

/* ── SUBMIT BUTTON ── */
.crmEntityFormView .submit-btn,
.crmEntityFormView .btn-primary,
.crmEntityFormView #InsertButton,
.crmEntityFormView #SubmitButton,
.crmEntityFormView #NextButton,
.crmEntityFormView button[type="submit"],
.crmEntityFormView input[type="submit"],
.crmEntityFormView .actions input[type="button"] {
  background: #FFD700 !important;
  background-color: #FFD700 !important;
  color: #1B3A6B !important;
  border: none !important;
  padding: 14px 38px !important;
  border-radius: 8px !important;
  font-weight: 700 !important;
  font-size: 15px !important;
  letter-spacing: 0.3px !important;
  cursor: pointer !important;
  box-shadow: 0 3px 12px rgba(255, 215, 0, 0.35) !important;
  margin-top: 10px !important;
  width: auto !important;
  transition: background 0.2s, transform 0.1s !important;
}

.crmEntityFormView .submit-btn:hover,
.crmEntityFormView .btn-primary:hover,
.crmEntityFormView #InsertButton:hover {
  background-color: #e6c200 !important;
  color: #1B3A6B !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 5px 18px rgba(255, 215, 0, 0.45) !important;
}

/* ── SECONDARY BUTTON ── */
.crmEntityFormView .btn-default,
.crmEntityFormView #PreviousButton {
  background: #ffffff !important;
  background-color: #ffffff !important;
  color: #1B3A6B !important;
  border: 2px solid #1B3A6B !important;
  padding: 12px 30px !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  cursor: pointer !important;
}

.crmEntityFormView .btn-default:hover {
  background-color: #1B3A6B !important;
  color: #ffffff !important;
}

/* ── VALIDATION ── */
.crmEntityFormView .validation-summary,
.crmEntityFormView .alert-danger {
  background-color: #fdecea !important;
  border: 1px solid #f5c6cb !important;
  border-radius: 8px !important;
  padding: 14px 18px !important;
  margin-bottom: 22px !important;
  color: #d9534f !important;
}

.crmEntityFormView .alert-success {
  background-color: #e8f5e9 !important;
  border: 1px solid #a5d6a7 !important;
  border-left: 4px solid #2e7d32 !important;
  color: #1b5e20 !important;
  border-radius: 8px !important;
  padding: 16px 20px !important;
  margin-bottom: 22px !important;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .crmEntityFormView,
  #EntityFormPanel {
    padding: 30px 25px !important;
    margin: 20px 15px !important;
    border-radius: 12px !important;
  }

  .crmEntityFormView table.section,
  .crmEntityFormView table.section tbody,
  .crmEntityFormView table.section tr,
  .crmEntityFormView table.section td {
    display: block !important;
    width: 100% !important;
  }

  .crmEntityFormView .submit-btn,
  .crmEntityFormView .btn-primary {
    width: 100% !important;
    padding: 14px !important;
  }
}

@media (max-width: 480px) {
  .crmEntityFormView,
  #EntityFormPanel {
    padding: 25px 18px !important;
  }
}