  /* form */
:root {
  --primary: #0056b3;
  --primary-dark: #004494;
  --secondary: #6c757d;
  --light: #f8f9fa;
  --dark: #343a40;
  --success: #28a745;
  --white: #ffffff;
  --orange: #FF6B00;
  --blue: #0056B3;
  --light-blue: #E6F0FF;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: #f5f7fa;
  color: #333;
  line-height: 1.6;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(12, 136, 84, 0.14), transparent 34%),
    radial-gradient(circle at 88% 82%, rgba(0, 86, 179, 0.11), transparent 36%),
    linear-gradient(135deg, #eef7f2 0%, #f7f9fb 48%, #edf4fb 100%);
  background-size: cover;
  background-position: center;
}

.form-container {
  width: 100%;
  max-width: 800px;
  background-color: white;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  margin: 2rem;
  overflow: hidden;
}

.form-header {
  padding: 2rem;
  background-color: #0c8854;
  color: white;
  text-align: center;
  position: relative;
}

.form-header::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 10px;
  background-color: #8cc14f;
}

.form-logo {
  display: block;
  width: min(100%, 620px);
  height: auto;
  margin: 0 auto 1.25rem;
  padding: 0.65rem 0.9rem;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.form-title {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.form-subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
}

.form-event-details {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.65rem;
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.96);
}

.form-steps {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
  position: relative;
}

.step {
  text-align: center;
  flex: 1;
  position: relative;
  z-index: 2;
}

.step-number {
  display: inline-block;
  width: 40px;
  height: 40px;
  line-height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.2);
  margin-bottom: 0.5rem;
  font-weight: bold;
  font-size: 1.1rem;
  border: 3px solid transparent;
}

.step.active .step-number {
  background-color: white;
  color: var(--blue);
  border-color: #8cc14f;
}

.step.completed .step-number {
  background-color: #8cc14f;
  color: white;
  border-color: #8cc14f;
}

.step-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: white;
}

.step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 20px;
  left: 51%;
  right: -50%;
  height: 3px;
  background-color: rgba(255, 255, 255, 0.3);
  z-index: 1;
}

.step.completed:not(:last-child)::after {
  background-color: #8cc14f;
}

.form-body {
  padding: 2rem;
}

.form-card {
  margin-bottom: 1.5rem;
  border-radius: 8px;
  padding: 1.5rem;
  background-color: var(--white);
}

.section-title {
  color: var(--blue);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--light-blue);
  font-size: 1.3rem;
  font-weight: 600;
}

.bilingual {
  display: flex;
  flex-direction: column;
}

.bilingual-ar {
  font-family: 'Arial', sans-serif;
  direction: rtl;
  margin-top: 0.5rem;
  font-size: 1.1rem;
  color: #555;
}

.form-row {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.form-group {
  flex: 1;
}

.form-group {
  position: relative;
  margin-bottom: 1rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  transition: all 0.3s;
  background-color: #f9f9f9;
}

.form-control:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.1);
  background-color: white;
}

select.form-control {
  appearance: none;
  background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0h24v24H0z"/><path d="M12 15l-4.243-4.243 1.415-1.414L12 12.172l2.828-2.829 1.415 1.414z" fill="rgba(0,0,0,0.4)"/></svg>');
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1rem;
  background-color: #f9f9f9;
}

textarea.form-control {
  min-height: 100px;
  resize: vertical;
}

.checkbox-group {
  display: flex;
  align-items: center;
  margin: 0.5rem 0;
}

.checkbox-group input[type="checkbox"] {
  margin-right: 0.75rem;
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}

.checkbox-group label {
  font-size: 0.9rem;
  cursor: pointer;
  color: #555;
}

.checkbox-group a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 500;
}

.checkbox-group a:hover {
  text-decoration: underline;
}

.checkbox-container.error {
  border: 1px solid #dc3545;
  padding: 10px;
  border-radius: 4px;
}

.checkbox-container {
  display: flex;
  flex-direction: column;
  margin-top: 1rem;
  border: 1px solid #eee;
  padding: 1.5rem;
  border-radius: 8px;
  background-color: #f9f9f9;
}

.checkbox-title {
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--blue);
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 0.75rem;
}

/* Error styles */
.error-message {
  color: #dc3545;
  font-size: 0.85rem;
  margin-top: 5px;
  width: 100%;
}

.is-invalid {
  border-color: #dc3545 !important;
}

.alert {
  margin-bottom: 1.5rem;
}

.alert-danger {
  background-color: #f8d7da;
  color: #721c24;
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid #f5c6cb;
  border-radius: 5px;
}

.form-footer {
  display: flex;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  border-top: 1px solid #eee;
  background-color: #f9f9f9;
}

.btn {
  padding: 0.75rem 2rem;
  font-size: 1rem;
  margin: auto;
  font-weight: 600;
  color: white;
  background-color: var(--blue);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s;
}

.btn:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn:active {
  transform: translateY(0);
}

.btn-outline {
  background-color: transparent;
  color: var(--blue);
  border: 2px solid var(--blue);
}

.btn-outline:hover {
  background-color: rgba(0, 86, 179, 0.05);
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #444;
}

.required::after {
  content: " *";
  color: #dc3545;
}

.phone-hint {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--secondary);
  line-height: 1.45;
  margin-top: 0.45rem;
}

.phone-hint::before {
  content: "ⓘ";
  color: var(--blue);
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .form-row {
    flex-direction: column;
    gap: 1rem;
  }
  
  .form-container {
    margin: 1rem;
  }
  
  .form-body {
    padding: 1.5rem;
  }
  
  .step-label {
    display: none;
  }
  
  .checkbox-grid {
    grid-template-columns: 1fr;
  }
}

.phone-group {
  display: grid;
  grid-template-columns: minmax(108px, 32%) minmax(0, 1fr);
  gap: 0;
  width: 100%;
  min-height: 48px;
  background: #fff;
  border: 1px solid #d7dce3;
  border-radius: 9px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.phone-group:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.1);
}

.phone-group.is-invalid-group,
.phone-group:has(.is-invalid) {
  border-color: #dc3545;
}

.phone-group .form-control,
.phone-group .form-control:focus {
  height: 46px;
  border: 0;
  border-radius: 0;
  background-color: transparent;
  box-shadow: none;
}

.phone-group .is-invalid {
  border-color: transparent !important;
}

.phone-error {
  margin-top: 0.45rem;
  line-height: 1.35;
}

.phone-number {
  min-width: 0;
  letter-spacing: 0.02em;
}

.searchable-select {
  position: relative;
}

#phone_code_widget {
  width: auto;
  min-width: 0;
}

#phone_code_widget::after {
  content: "";
  position: absolute;
  top: 9px;
  right: 0;
  bottom: 9px;
  width: 1px;
  background: #e3e6ea;
  pointer-events: none;
}

.phone-prefix {
  padding-right: 2rem !important;
  color: #0c8854;
  font-weight: 700;
  cursor: pointer;
  background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path fill="%236b7280" d="M5.5 7.5 10 12l4.5-4.5z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
  background-size: 0.9rem;
}

.searchable-select .form-control {
  width: 100%;
}

.searchable-list {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 20;
  background: white;
  border: 1px solid #ddd;
  border-radius: 6px;
  max-height: 220px;
  overflow-y: auto;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  margin-top: 2px;
}

#phone_code_widget .searchable-list {
  right: auto;
  width: min(340px, calc(100vw - 3rem));
  margin-top: 7px;
  border-radius: 9px;
}

@media (max-width: 420px) {
  .phone-group {
    grid-template-columns: 102px minmax(0, 1fr);
  }

  .phone-group .form-control {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    font-size: 0.94rem;
  }

  .phone-prefix {
    padding-right: 1.7rem !important;
  }
}

.searchable-select.open .searchable-list {
  display: block;
}

.searchable-item {
  padding: 0.6rem 1rem;
  cursor: pointer;
  font-size: 0.9rem;
}

.searchable-item:hover,
.searchable-item.highlighted {
  background: var(--light-blue);
}

.searchable-item.no-results {
  color: var(--secondary);
  cursor: default;
}

.searchable-item.no-results:hover {
  background: transparent;
}

