body {
  box-sizing: border-box;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Inputs */
.input-field {
  transition: all 0.3s ease;
}

.input-field:focus {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

/* Submit Button */
.submit-btn {
  transition: all 0.3s ease;
}

.submit-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(99, 102, 241, 0.3);
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Error */
.error-message {
  animation: shake 0.3s ease;
  color: red;
  font-size: 13px;
}

@keyframes shake {
  0%,100%{transform:translateX(0);}
  25%{transform:translateX(-5px);}
  75%{transform:translateX(5px);}
}

/* Success Toast */
.success-toast {
  animation: slideIn 0.4s ease;
}

@keyframes slideIn {
  from{transform:translateY(-100%);opacity:0;}
  to{transform:translateY(0);opacity:1;}
}

/* Icon Animation */
.security-icon {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,100%{transform:scale(1);}
  50%{transform:scale(1.05);}
}

/* Country Dropdown Scroll */
.country-code-dropdown {
  max-height: 200px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f1f5f9;
}

.country-code-dropdown::-webkit-scrollbar {
  width: 8px;
}
.country-code-dropdown::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}
.country-code-dropdown::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

/* Utility */
.hidden {
  display: none;
}

/*Additional CSS needed (add to contactform.css): by Deepseek*/
/* Phone input validation styles */
#mecf-mobile.limit-exceeded {
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

/* Shake animation for feedback */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

#mecf-mobile.shake {
  animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
  border-color: #dc3545;
}

/* Digit counter (optional visual feedback) */
.phone-digit-counter {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: #666;
  background: #f8f9fa;
  padding: 2px 6px;
  border-radius: 3px;
  pointer-events: none;
}

/* Make phone row relative for positioning */
.mecf-phone-row {
  position: relative;
}

/* Adjust input width to accommodate counter */
#mecf-mobile {
  padding-right: 60px;
}

/* Error state styling */
#mecf-mobile-error {
  color: #dc3545;
  font-size: 0.875em;
  margin-top: 0.25rem;
  min-height: 1.25rem;
}

/* ================= PHONE ROW HEIGHT FIX by ChatGpt================= */

/* Ensure both elements use same sizing model */
.mecf-phone-row select,
.mecf-phone-row input,
.mecf-selected {
  box-sizing: border-box;
  height: 48px;              /* 🔑 SAME HEIGHT */
  padding: 0 14px;
  font-size: 14px;
  line-height: 48px;         /* 🔑 Vertical centering */
  border-radius: 8px;
  margin-left: 5px;
}

/* Native <select> (country dropdown) */
.mecf-phone-row select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: #fff;
  border: 1px solid #d1d5db;
  display: flex;
  align-items: center;
}

/* Mobile number input */
#mecf-mobile {
  height: 48px;
  line-height: 48px;
}

/* Custom dropdown trigger (if used) */
.mecf-selected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #d1d5db;
  background: #fff;
  cursor: pointer;
}

/* Arrow alignment */
.mecf-arrow {
  line-height: 1;
  font-size: 12px;
}

/* Fix row alignment */
.mecf-phone-row {
  display: flex;
  gap: 12px;
  align-items: center; /* 🔑 keeps both aligned */
}

/* ================= COUNTRY SELECT ARROW FIX by ChatGpt================= */

.mecf-country-box {
  position: relative;
}

/* Native select styling */
#mecf-country {
  width: 40%;
  height: 48px;
  padding: 0 42px 0 14px; /* space for arrow */
  font-size: 14px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background-color: #fff;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
}

/* Custom arrow */
.mecf-country-box::after {
  content: "▼";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: #555;
  pointer-events: none; /* click goes to select */
}

/* ================= COUNTRY SELECT FIX by ChatGpt ================= */

.mecf-country-select {
  width: 100%;
  height: 48px;                 /* MATCH mobile input height */
  padding: 0 42px 0 14px;       /* space for arrow */
  font-size: 14px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background-color: #fff;
  cursor: pointer;

  /* Remove default arrow */
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  /* Custom arrow */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 8px;
}

/* Focus state */
.mecf-country-select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
