/* Allow dropdowns to escape card/form clipping in hero */
aside.card,
aside.card form {
  overflow: visible;
}

.idp-field { margin-bottom: 14px; }
.idp-field-label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.idp-auto-badge {
  font-size: 10px;
  font-weight: 500;
  color: #2B30A3;
  background: #eef0ff;
  padding: 1px 6px;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.3s;
}
.idp-auto-badge.visible { opacity: 1; }

.idp-dropdown-wrapper { position: relative; }
.idp-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #d1d5db;
  border-radius: 12px; /* rounded-xl */
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #111827;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.idp-dropdown-trigger:hover { border-color: #9ca3af; }
.idp-dropdown-trigger:focus-within {
  border-color: #2B30A3;
  box-shadow: 0 0 0 3px rgba(43,48,163,0.12);
}
.idp-dropdown-trigger img.idp-flag {
  width: 22px; height: 16px;
  object-fit: cover;
  border-radius: 2px;
  border: 1px solid #e5e7eb;
}
.idp-dropdown-trigger input {
  border: none; outline: none; flex: 1;
  font-size: 14px; font-weight: 500; color: #111827;
  font-family: inherit; background: transparent;
  min-width: 0;
}
.idp-dropdown-trigger input::placeholder { color: #9ca3af; font-weight: 400; }
.idp-dropdown-trigger .idp-arrow {
  width: 16px;
  height: 16px;
  color: #6b7280;
  transition: transform 0.2s;
  flex-shrink: 0;
  display: block;
}
.idp-dropdown-trigger .idp-arrow.open { transform: rotate(180deg); }

.idp-dropdown-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  z-index: 100;
  background: #fff;
  border: 1.5px solid #d1d5db;
  border-radius: 12px; /* rounded-xl */
  max-height: 220px;
  overflow-y: auto;
  display: none;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.idp-dropdown-list.open { display: block; }
.idp-dropdown-list::-webkit-scrollbar { width: 6px; }
.idp-dropdown-list::-webkit-scrollbar-track { background: transparent; }
.idp-dropdown-list::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }

.idp-dropdown-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  cursor: pointer;
  font-size: 13px;
  color: #374151;
  transition: background 0.1s;
}
.idp-dropdown-option:hover { background: #f3f4f6; }
.idp-dropdown-option.selected { background: #eef0ff; color: #2B30A3; font-weight: 600; }
.idp-dropdown-option img.idp-flag {
  width: 20px; height: 15px;
  object-fit: cover;
  border-radius: 2px;
  border: 1px solid #e5e7eb;
}
.idp-no-results { padding: 12px 14px; color: #9ca3af; font-size: 13px; }

/* Result */
.idp-result-card {
  margin-top: 16px;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px; /* match .idp-dropdown-trigger */
  overflow: hidden;
  animation: idpFadeIn 0.25s ease;
}
@keyframes idpFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.idp-result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px dashed #e5e7eb;
  font-size: 13px;
  font-weight: 500;
}
.idp-result-row:last-child { border-bottom: none; }
.idp-result-row .idp-rlabel {
  display: flex; align-items: center; gap: 8px;
  color: #6b7280;
}
.idp-result-row .idp-rlabel svg { width: 16px; height: 16px; flex-shrink: 0; }
.idp-result-row .idp-rvalue {
  color: #374151;
  font-size: 13px;
  text-align: right;
  font-weight: 600;
}

.idp-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.idp-badge svg { width: 14px; height: 14px; }
.idp-badge.accepted { background: #ecfdf5; color: #065f46; }
.idp-badge.not-accepted { background: #fef2f2; color: #991b1b; }
.idp-badge.conditions { background: #fffbeb; color: #92400e; }

.idp-condition-note {
  padding: 8px 14px;
  font-size: 12px;
  color: #92400e;
  background: #fffbeb;
  border-top: 1px dashed #fcd34d;
  line-height: 1.4;
}
