/* Isolated contact form. System fonts beat the global Geist * selector
   so labels/notes keep real word spacing. */
.cf,
.cf * {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "IBM Plex Sans Arabic", ui-sans-serif, sans-serif;
  font-synthesis: none;
  letter-spacing: 0.01em;
  word-spacing: 0.06em;
  box-sizing: border-box;
}

.cf {
  display: flex;
  flex-direction: column;
  gap: 1.85rem;
}

.cf-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.45rem 1.5rem;
}

@media (min-width: 640px) {
  .cf-grid {
    grid-template-columns: 1fr 1fr;
  }

  .cf-span {
    grid-column: 1 / -1;
  }
}

.cf-field {
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
}

.cf-label,
.cf-legend {
  display: block;
  margin: 0 0 0.65rem;
  padding: 0;
  border: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  color: #374151;
}

.cf-opt {
  color: #9ca3af;
  font-weight: 400;
}

.cf-req {
  color: #0074d9;
  font-weight: 600;
}

.cf-error {
  margin: 0.4rem 0 0;
  font-size: 12.5px;
  line-height: 1.4;
  color: #b91c1c;
}

.cf-error[hidden] {
  display: none;
}

.cf-field.is-invalid .cf-input,
.cf-field.is-invalid .cf-area,
.cf-field.is-invalid .cf-phone,
.cf-field.is-invalid .cf-select-trigger,
.cf-fieldset.is-invalid .cf-chip span {
  border-color: #dc2626;
}

.cf-input,
.cf-area {
  width: 100%;
  margin: 0;
  padding: 0 1.05rem;
  height: 52px;
  border: 1px solid #d7dbe2;
  border-radius: 12px;
  background: #fff;
  color: #111827;
  font-size: 15px;
  line-height: 1.45;
  font-family: inherit;
  letter-spacing: 0.01em;
  word-spacing: 0.06em;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.cf-area {
  height: auto;
  min-height: 128px;
  padding: 0.95rem 1.05rem;
  resize: vertical;
}

.cf-input::placeholder,
.cf-area::placeholder {
  color: #9ca3af;
}

.cf-input:hover,
.cf-area:hover,
.cf-phone:hover,
.cf-select-trigger:hover {
  border-color: #9aa3b2;
}

.cf-input:focus,
.cf-area:focus {
  outline: none;
  border-color: #0074d9;
  box-shadow: 0 0 0 4px rgba(0, 116, 217, 0.12);
}

.cf-phone {
  display: flex;
  align-items: stretch;
  width: 100%;
  height: 52px;
  border: 1px solid #d7dbe2;
  border-radius: 12px;
  background: #fff;
  overflow: visible;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.cf-phone:focus-within {
  border-color: #0074d9;
  box-shadow: 0 0 0 4px rgba(0, 116, 217, 0.12);
}

.cf-phone .cf-select-wrap,
.cf-select-wrap.cf-dial-wrap {
  flex: 0 0 9.5rem;
  width: 9.5rem;
  max-width: 9.5rem;
}

.cf-phone .cf-select-trigger {
  height: 50px;
  border: 0;
  border-radius: 12px 0 0 12px;
  box-shadow: none;
  padding: 0 10px 0 14px;
  background: transparent;
}

.cf-phone .cf-select-trigger:hover,
.cf-phone .cf-select-wrap.is-open .cf-select-trigger {
  border: 0;
  box-shadow: none;
}

.cf-phone-split {
  width: 1px;
  margin: 10px 0;
  background: #e5e7eb;
  flex-shrink: 0;
}

.cf-phone-input {
  flex: 1 1 auto;
  width: auto;
  min-width: 9rem;
  height: 100%;
  border: 0;
  border-radius: 0 12px 12px 0;
  box-shadow: none;
  background: transparent;
  padding-left: 0.95rem;
  padding-right: 1rem;
}

.cf-phone-input:hover,
.cf-phone-input:focus {
  border: 0;
  box-shadow: none;
}

.cf-select-wrap {
  position: relative;
  width: 100%;
}

.cf-field:has(.cf-select-wrap.is-open) {
  z-index: 30;
}

.cf-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-width: 0;
  height: 52px;
  margin: 0;
  padding: 0 16px;
  border: 1px solid #d7dbe2;
  border-radius: 12px;
  background: #fff;
  color: #111827;
  font-size: 15px;
  font-family: inherit;
  letter-spacing: 0.01em;
  word-spacing: 0.06em;
  cursor: pointer;
  text-align: start;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.cf-select-wrap.is-open .cf-select-trigger {
  border-color: #0074d9;
  box-shadow: 0 0 0 4px rgba(0, 116, 217, 0.12);
}

.cf-select-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cf-select-value.is-placeholder {
  color: #9ca3af;
}

.cf-chevron {
  flex-shrink: 0;
  color: #6b7280;
  transition: transform .18s ease;
}

.cf-select-wrap.is-open .cf-chevron {
  transform: rotate(180deg);
}

.cf-select-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 50;
  width: 100%;
  min-width: 260px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
}

.cf-select-wrap.is-open .cf-select-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.cf-dial-wrap .cf-select-panel {
  width: 300px;
}

[dir="rtl"] .cf-dial-wrap .cf-select-panel {
  left: auto;
  right: 0;
}

.cf-select-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 10px;
  min-height: 36px;
  border: 0;
  border-bottom: 1px solid #f1f2f4;
  border-radius: 0;
  background: #fff;
  color: #9ca3af;
}

.cf-search-icon {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
}

.cf-select-search input {
  width: 100%;
  height: 22px;
  margin: 0;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 14px;
  line-height: 22px;
  color: #111827;
  font-family: inherit;
  letter-spacing: 0.01em;
  -webkit-appearance: none;
  appearance: none;
}

.cf-select-list {
  max-height: 280px;
  overflow-y: auto;
  padding: 4px;
}

.cf-select-list::-webkit-scrollbar {
  width: 6px;
}

.cf-select-list::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 99px;
}

.cf-select-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  color: #374151;
  font-size: 14px;
  line-height: 1.35;
  cursor: pointer;
}

.cf-select-option[hidden] {
  display: none !important;
}

.cf-select-option:hover,
.cf-select-option.is-active {
  background: #f3f6f9;
}

.cf-select-option.selected {
  background: #eef6ff;
  color: #0b4f8a;
  font-weight: 500;
}

.cf-check {
  flex-shrink: 0;
  opacity: 0;
  color: #0074d9;
}

.cf-select-option.selected .cf-check {
  opacity: 1;
}

.cf-select-empty {
  display: none;
  padding: 18px 14px;
  text-align: center;
  color: #9ca3af;
  font-size: 13px;
}

.cf-select-wrap.is-empty .cf-select-empty {
  display: block;
}

.cf-select-wrap.is-empty .cf-select-list {
  display: none;
}

.cf-fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.cf-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.cf-chip {
  display: inline-flex;
  margin: 0;
  cursor: pointer;
}

.cf-chip input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.cf-chip span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 0.7rem;
  border: 1px solid #d7dbe2;
  border-radius: 999px;
  background: #fff;
  color: #374151;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.01em;
  word-spacing: 0.06em;
  user-select: none;
  transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.cf-chip:hover span {
  border-color: #9aa3b2;
}

.cf-chip input:checked + span {
  background: #0074d9;
  border-color: #0074d9;
  color: #fff;
}

.cf-chip input:focus-visible + span {
  box-shadow: 0 0 0 4px rgba(0, 116, 217, 0.18);
}

.cf-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  padding-top: 0.5rem;
}

.cf-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  height: 52px;
  width: 100%;
  padding: 0 1.65rem;
  border: 0;
  border-radius: 12px;
  background: #0074d9;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  letter-spacing: 0.01em;
  word-spacing: 0.08em;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: background .15s ease, transform .1s ease;
}

.cf-submit:hover {
  background: #0060b8;
}

.cf-submit:active {
  transform: scale(0.985);
}

.cf-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.cf-submit svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.cf-note {
  margin: 0;
  max-width: 26rem;
  font-size: 13.5px;
  line-height: 1.65;
  letter-spacing: 0.01em;
  word-spacing: 0.08em;
  color: #9ca3af;
}

.cf-hidden {
  display: none !important;
}

.cf-flip {
  transform: scaleX(-1);
}

#btnLoader {
  animation: cf-spin 0.7s linear infinite;
}

@keyframes cf-spin {
  to { transform: rotate(360deg); }
}

.cf-card {
  overflow: visible;
  position: relative;
  z-index: 2;
}

@media (max-width: 639px) {
  .cf-phone .cf-select-wrap,
  .cf-select-wrap.cf-dial-wrap {
    flex: 0 0 7.75rem;
    width: 7.75rem;
    max-width: 7.75rem;
  }

  .cf-phone-input {
    min-width: 0;
  }
}

.cf-toast {
  position: fixed;
  top: 76px;
  right: 16px;
  z-index: 2000;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: min(380px, calc(100vw - 32px));
  padding: 14px 12px 14px 14px;
  background: #fff;
  border: 1px solid #e7e9ee;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
  color: #111827;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}

.cf-toast.is-on {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.cf-toast[hidden] {
  display: none;
}

.cf-toast.is-on[hidden] {
  display: flex;
}

.cf-toast-mark {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fee2e2;
  color: #b91c1c;
}

.cf-toast.is-success .cf-toast-mark {
  background: #dcfce7;
  color: #15803d;
}

.cf-toast-body {
  min-width: 0;
  flex: 1;
  padding-top: 2px;
}

.cf-toast-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}

.cf-toast-msg {
  margin: 2px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: #6b7280;
}

.cf-toast-x {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
}

.cf-toast-x:hover {
  background: #f3f4f6;
  color: #374151;
}

@media (max-width: 767px) {
  .cf-submit {
    min-height: 52px;
  }

  .cf-toast {
    top: 68px;
    right: 12px;
    left: 12px;
    width: auto;
  }
}
