/* Mailform Pro Professional Style for Rakupato */

/* --- Error Messages --- */
.mfp_err {
  display: none;
  margin-top: 6px;
  padding: 6px 10px;
  font-size: 13px;
  line-height: 1.5;
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 4px;
}
.mfp_err:not(:empty) {
  display: block;
}
#mfp_error {
  display: none;
  margin: 0 0 20px;
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.7;
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 6px;
}
#mfp_warning {
  display: none;
  margin: 0 0 20px;
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.7;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 6px;
}
.mfp_invalid {
  border-color: #ef4444 !important;
  background-color: #fff7f7 !important;
}

/* --- Loading Spinner --- */
#mfp_loading_screen {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.6);
  z-index: 10000;
}
#mfp_loading {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  width: 48px;
  height: 48px;
  margin: -24px 0 0 -24px;
  border: 5px solid #c7d2fe;
  border-top-color: #2a43a7;
  border-radius: 50%;
  animation: mfp_spin 0.8s linear infinite;
  z-index: 10001;
}
@keyframes mfp_spin { to { transform: rotate(360deg); } }

/* --- Confirmation Overlay (The most critical part) --- */
#mfp_overlay_background {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 99990;
}
#mfp_overlay {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  width: 90%;
  max-width: 600px;
  transform: translate(-50%, -50%);
  padding: 24px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  z-index: 99991;
  max-height: 85vh;
  overflow-y: auto;
}

/* --- Table Styles --- */
#mfp_confirm_table {
  width: 100%;
  margin: 16px 0;
  border-collapse: collapse;
}
#mfp_confirm_table th, #mfp_confirm_table td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid #eee;
  font-size: 14px;
}
#mfp_confirm_table th {
  width: 30%;
  color: #666;
  font-weight: bold;
}

/* --- Buttons --- */
.mfp_buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
}
.mfp_element_button {
  padding: 12px 30px;
  font-size: 15px;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid #ccc;
}
.mfp_element_button:hover {
  opacity: 0.8;
  transform: translateY(-1px);
}
#mfp_button_send {
  background: #2a43a7;
  color: #fff;
  border: none;
}
#mfp_button_back {
  background: #f3f4f6;
  color: #333;
}

/* --- Fallback: hide empty/stale error containers --- */
.mfp_err:empty,
#mfp_error:empty,
#mfp_warning:empty {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  overflow: hidden !important;
}

.mfp_err[style*="display: none"],
.mfp_err[style*="display:none"] {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
}

#mfp_error[style*="display: none"],
#mfp_error[style*="display:none"],
#mfp_warning[style*="display: none"],
#mfp_warning[style*="display:none"] {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
}