/* --- Central Form Container --- 
   Main wrapper for the form, centered with a shadow and top border 
*/
.form-main-container {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  padding: 35px 30px;
  border-radius: 12px;
  box-shadow: 0px 15px 35px rgba(0, 0, 0, 0.12);
  max-width: 500px;
  margin: 40px auto;
  border-top: 5px solid #0154c5;
  font-family: 'Inter', sans-serif;
  box-sizing: border-box;
}

/* --- FOMO & Security Boxes (Tailored for Italy) --- */
.important-box {
  background-color: #fffbeb;
  border-left: 4px solid #f59e0b;
  padding: 15px 20px;
  margin-bottom: 25px;
  color: #555;
  font-size: 15px;
  border-radius: 0 8px 8px 0;
  line-height: 1.5;
}

.fomo-box {
  background-color: #fdf2f8;
  border-left: 4px solid #be185d;
  padding: 18px 20px;
  margin-bottom: 25px;
  color: #831843;
  font-size: 16px;
  border-radius: 4px;
  line-height: 1.5;
}

.fomo-box strong {
  font-weight: 800;
}

/* --- Overlay Background --- */
.overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.85); /* Light overlay to keep form visible but blocked */
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  border-radius: 12px;
}

.overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* --- Modern Circular Spinner --- */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #0154c5; /* Your theme blue */
  border-radius: 50%;
  display: none; /* Hidden by default */
}

/* JS calls .ui.spinner.classList.toggle('active', true) */
.spinner.active {
  display: block;
  animation: spin 0.8s linear infinite;
}

/* --- Message Modal Styles --- */
.message-modal {
  display: none; /* Hidden while spinner is spinning */
  background: #ffffff;
  padding: 30px 20px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  width: 80%;
  max-width: 320px;
  text-align: center;
  position: relative;
  line-height: 1.4; /* הוסף מרווח לשורות במידה וההודעה באיטלקית ארוכה */
}

/* When message is ready, we show the modal and hide the spinner via JS */
.message-modal.active {
  display: block;
  animation: fadeInUp 0.4s ease-out forwards;
}

/* --- Animations --- */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Closer Button Styling */
.message__closer {
  position: absolute;
  top: 8px;
  right: 12px;
  cursor: pointer;
  font-weight: bold;
  color: #888;
}

/* --- Header Section --- 
   Red, bold, uppercase title for high visibility 
*/
.form-header-title {
  color: #d9534f;
  font-weight: 900;
  text-align: center;
  font-size: 20px;
  margin-bottom: 25px;
  text-transform: uppercase;
  line-height: 1.3; /* מונע צפיפות אם הכותרת יורדת שורה */
}

/* --- Inner Form Reset --- 
   Removes background/padding to ensure it fits perfectly inside the container 
*/
.f1t-form {
  background: transparent;
  padding: 0;
  box-shadow: none;
}

/* --- Standard Input Fields --- 
   Common styles for text, email, and password inputs 
*/
.f1t-form input[type='text'],
.f1t-form input[type='email'],
.f1t-form input[type='password'] {
  width: 100%;
  padding: 16px;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-sizing: border-box;
  font-size: 16px;
  background-color: #f8fafc;
  transition: all 0.2s ease;
}

/* --- Telephone Input --- 
   Separated to handle specific padding needs for the country flag/dial code (+39)
*/
.f1t-form input[type='tel'] {
  width: 100%;
  padding-top: 16px;
  padding-bottom: 16px;
  padding-right: 12px;
  padding-left: 90px !important; /* Prevents text from overlapping the flag and dial code */
  border: 1px solid #ccc;
  border-radius: 8px;
  box-sizing: border-box;
  font-size: 16px;
  background-color: #f8fafc;
  transition: all 0.2s ease;
}

/* --- Focus State --- 
   Highlights the active field with a blue border and glow 
*/
.f1t-form input:focus {
  border-color: #0154c5;
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(1, 84, 197, 0.2);
  outline: none;
}

/* --- Intl-Tel-Input Integration --- 
   Ensures the plugin container takes up the full width of the form 
*/
.f1t-form .iti {
  display: block;
  width: 100%;
}

#regUnavailable {
  margin: 0;
}

/* --- Checkbox Section --- 
   Aligns the checkbox with the beginning of the text label 
*/
.f1t-field--checkbox {
  display: flex;
  align-items: flex-start;
  line-height: 1.4; /* קריאות טובה יותר למשפטים ארוכים באיטלקית ליד הצ'קבוקס */
  font-size: 14px;
  color: #444;
}

.f1t-form input[type='checkbox'] {
  min-width: 20px;
  height: 20px;
  margin-right: 10px;
  cursor: pointer;
  margin-top: 2px; /* יישור מדויק יותר מול הטקסט במידה ויורד שורה */
  accent-color: #0154c5; /* Match theme blue */
}

/* --- Primary Submit Button --- 
   Green action button with hover lift effect 
*/
.f1t-form button[type='submit'] {
  background-color: #11bc01;
  color: white;
  font-weight: 800;
  text-transform: uppercase;
  border-radius: 8px;
  border: none;
  padding: 18px;
  cursor: pointer;
  font-size: 18px;
  width: 100%;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-top: 10px;
  box-shadow: 0 4px 15px rgba(17, 188, 1, 0.3);
  word-wrap: break-word; /* מבטיח שהטקסט לא יפרוץ את הכפתור במסכים קטנים */
}

.f1t-form button[type='submit']:hover {
  background-color: #0fa001;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(17, 188, 1, 0.4);
}

.f1t-form button[type='submit']:active {
  transform: translateY(0);
}

/* --- Footer Text --- 
   Small, greyed-out legal and privacy info 
*/
.form-footer-text {
  font-size: 11px;
  color: #888888;
  text-align: center;
  margin-top: 20px;
  line-height: 1.4;
}

/* --- Validation & Error Styling --- 
   Used by JS to highlight invalid inputs and show error messages 
*/
.input-invalid {
  border-color: #d9534f !important;
  background-color: #fff5f5 !important;
}

.field-invalid {
  color: #d9534f;
  font-size: 12px;
  margin-top: 5px;
  display: block;
}

/* --- Password Toggle Visibility --- 
   Utility class for password show/hide icons 
*/
.eye-off-icon {
  display: none;
}