/* Phone input — standalone (loaded after style.css) */
.form-group .phone-input-group {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  width: 100%;
}
.form-group .phone-input-group .phone-local-input {
  width: auto !important;
  max-width: none;
  flex: 1 1 auto;
  min-width: 0;
}
.phone-input-group {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  width: 100%;
  background: #ffffff;
  background: var(--surface, #fff);
  border: 1px solid #e2e8f0;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  border-radius: var(--radius, 12px);
  overflow: visible;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.phone-input-group:focus-within {
  border-color: #1a4d8c;
  border-color: var(--primary, #1a4d8c);
  box-shadow: 0 0 0 3px rgba(26, 77, 140, 0.14);
}
.phone-country-picker {
  position: relative;
  flex: 0 0 auto;
  align-self: stretch;
}
button.phone-country-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 100%;
  min-height: 2.85rem;
  min-width: 8.75rem;
  padding: 0.5rem 0.65rem 0.5rem 0.75rem;
  margin: 0;
  border: none;
  border-inline-end: 1px solid #e2e8f0;
  border-inline-end: 1px solid var(--border, #e2e8f0);
  border-radius: 12px 0 0 12px;
  border-radius: var(--radius, 12px) 0 0 var(--radius, 12px);
  background: linear-gradient(145deg, rgba(26, 77, 140, 0.09) 0%, rgba(245, 124, 0, 0.06) 100%);
  font-family: inherit;
  font-size: 0.95rem;
  color: #0f172a;
  color: var(--text, #0f172a);
  cursor: pointer;
  white-space: nowrap;
  appearance: none;
  -webkit-appearance: none;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
body.lang-en button.phone-country-trigger {
  border-radius: 0 12px 12px 0;
  border-radius: 0 var(--radius, 12px) var(--radius, 12px) 0;
  border-inline-end: none;
  border-inline-start: 1px solid #e2e8f0;
  border-inline-start: 1px solid var(--border, #e2e8f0);
  padding: 0.5rem 0.75rem 0.5rem 0.65rem;
}
button.phone-country-trigger:hover {
  background: linear-gradient(145deg, rgba(26, 77, 140, 0.14) 0%, rgba(245, 124, 0, 0.1) 100%);
}
.phone-country-picker.open button.phone-country-trigger {
  background: linear-gradient(145deg, rgba(26, 77, 140, 0.18) 0%, rgba(245, 124, 0, 0.12) 100%);
  box-shadow: inset 0 0 0 1px rgba(26, 77, 140, 0.2);
}
button.phone-country-trigger:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px #1a4d8c;
  box-shadow: inset 0 0 0 2px var(--primary, #1a4d8c);
}
.phone-country-trigger-dial font {
  font: inherit !important;
  vertical-align: baseline !important;
}
.phone-country-trigger-dial {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: #1a4d8c;
  color: var(--primary, #1a4d8c);
  font-variant-numeric: tabular-nums;
}
.phone-country-trigger-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.35rem;
  margin-inline-start: 0.1rem;
  border-radius: 50%;
  background: rgba(26, 77, 140, 0.12);
  color: #1a4d8c;
  color: var(--primary, #1a4d8c);
  font-size: 0.62rem;
  transition: transform 0.25s ease, background 0.2s ease;
}
button.phone-country-trigger:hover .phone-country-trigger-chevron {
  background: rgba(26, 77, 140, 0.2);
}
.phone-country-picker.open .phone-country-trigger-chevron {
  transform: rotate(180deg);
  background: rgba(245, 124, 0, 0.22);
  color: #e65100;
  color: var(--accent-dark, #e65100);
}
.phone-country-panel {
  position: absolute;
  top: calc(100% + 6px);
  inset-inline-start: 0;
  z-index: 200;
  min-width: 18rem;
  background: #fff;
  background: var(--surface, #fff);
  border: 1px solid #e2e8f0;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  border-radius: var(--radius, 12px);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.2);
  overflow: hidden;
}
.phone-country-panel[hidden] {
  display: none !important;
}
.phone-country-search {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: none;
  border-bottom: 1px solid #e2e8f0;
  border-bottom: 1px solid var(--border, #e2e8f0);
  font-family: inherit;
  font-size: 0.9rem;
  background: #f8fafc;
  background: var(--bg, #f8fafc);
}
.phone-country-search:focus {
  outline: none;
  background: #fff;
}
.phone-country-options {
  max-height: 260px;
  overflow-y: auto;
  padding: 0.35rem 0;
  scrollbar-width: thin;
}
.phone-country-group-title {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.9rem 0.35rem;
  border: none;
  background: linear-gradient(90deg, rgba(245, 124, 0, 0.12), transparent);
  border-inline-end: 3px solid #f57c00;
  border-inline-end: 3px solid var(--accent, #f57c00);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  color: #f57c00;
  color: var(--accent, #f57c00);
  cursor: pointer;
  text-align: inherit;
}
.phone-country-group-title .group-chevron {
  margin-inline-start: auto;
  font-size: 0.65rem;
  color: #64748b;
  color: var(--text-muted, #64748b);
  transition: transform 0.2s;
}
.phone-country-group.expanded .group-chevron {
  transform: rotate(180deg);
}
.phone-country-group.collapsed .phone-country-group-body {
  display: none;
}
button.phone-country-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.9rem;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.92rem;
  text-align: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: background 0.15s;
}
button.phone-country-option:hover {
  background: rgba(26, 77, 140, 0.07);
}
button.phone-country-option.selected {
  background: rgba(26, 77, 140, 0.11);
  color: #1a4d8c;
  color: var(--primary, #1a4d8c);
  font-weight: 600;
}
.phone-country-option-flag {
  font-size: 1.25rem;
  line-height: 1;
  flex-shrink: 0;
}
.phone-country-option-name {
  flex: 1;
  min-width: 0;
}
.phone-country-option-dial {
  font-weight: 600;
  color: #64748b;
  color: var(--text-muted, #64748b);
  font-size: 0.85rem;
  flex-shrink: 0;
}
button.phone-country-option.selected .phone-country-option-dial {
  color: #1a4d8c;
  color: var(--primary, #1a4d8c);
}
.phone-local-input {
  flex: 1;
  min-width: 0;
  width: auto;
  padding: 0.7rem 1rem;
  border: none;
  border-radius: 0;
  background: transparent;
  font-family: inherit;
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-align: left;
  box-shadow: none;
}
.phone-local-input:focus {
  outline: none;
  box-shadow: none;
}
.phone-local-input::placeholder {
  color: #64748b;
  color: var(--text-muted, #64748b);
  opacity: 0.75;
}
body.lang-en .phone-country-group-title {
  border-inline-end: none;
  border-inline-start: 3px solid #f57c00;
  border-inline-start: 3px solid var(--accent, #f57c00);
}
.feedback-modal .phone-country-panel {
  z-index: 300;
}
@media (max-width: 480px) {
  .phone-input-group {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
  }
  .phone-country-picker {
    flex: 0 0 auto;
    width: auto;
    max-width: 42%;
  }
  button.phone-country-trigger {
    width: auto;
    min-width: 0;
    max-width: 100%;
    padding: 0.45rem 0.5rem;
    gap: 0.35rem;
    border-inline-end: 1px solid #e2e8f0;
    border-inline-end: 1px solid var(--border, #e2e8f0);
    border-bottom: none;
    border-radius: 12px 0 0 12px;
    border-radius: var(--radius, 12px) 0 0 var(--radius, 12px);
  }
  body.lang-en button.phone-country-trigger {
    border-radius: 0 12px 12px 0;
    border-radius: 0 var(--radius, 12px) var(--radius, 12px) 0;
    border-inline-start: 1px solid #e2e8f0;
    border-inline-start: 1px solid var(--border, #e2e8f0);
  }
  .phone-country-trigger-dial {
    font-size: 0.85rem;
  }
  .phone-country-trigger-chevron {
    width: 1.15rem;
    height: 1.15rem;
    font-size: 0.55rem;
  }
  .phone-local-input {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    padding: 0.65rem 0.75rem;
    font-size: 0.95rem;
  }
}
