/* GAM geography / device / inventory-type targeting panels */

.gam-targeting-panel {
  border: 1px solid #dde3ea;
  border-radius: 10px;
  background: #fff;
  padding: 1.25rem 1.35rem;
  margin: 0.75rem 0 1.5rem;
}

.gam-targeting-panel > .gam-targeting-intro {
  margin: 0 0 1.15rem;
  padding: 0.75rem 0.9rem;
  background: #f0f7ff;
  border: 1px solid #d6e6f8;
  border-radius: 8px;
  color: #334;
  font-size: 0.9rem;
  line-height: 1.45;
}

.gam-targeting-section {
  margin-bottom: 1.25rem;
}

.gam-targeting-section:last-child {
  margin-bottom: 0;
}

.gam-targeting-section h4 {
  margin: 0 0 0.55rem;
  font-size: 0.95rem;
  font-weight: 650;
  color: #1f2937;
}

.gam-targeting-hint {
  display: block;
  margin-top: 0.35rem;
  color: #6b7280;
  font-size: 0.8rem;
}

.gam-targeting-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 768px) {
  .gam-targeting-grid-2 {
    grid-template-columns: 1fr;
  }
}

.gam-country-box {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fafbfc;
  padding: 0.65rem;
}

.gam-country-box .gam-country-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.45rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #374151;
}

.gam-country-box .gam-country-count {
  font-weight: 500;
  color: #6b7280;
  font-size: 0.75rem;
}

.gam-country-filter {
  margin-bottom: 0.5rem;
}

.gam-country-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(3.4rem, 1fr));
  gap: 0.35rem;
  max-height: 11.5rem;
  overflow-y: auto;
  padding: 0.15rem;
}

.gam-check-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0.35rem 0.65rem;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #fff;
  color: #374151;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.gam-check-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.gam-check-chip:hover {
  border-color: #93c5fd;
  background: #f8fbff;
}

.gam-check-chip.is-checked,
.gam-check-chip:has(input:checked) {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
}

.gam-check-chip.is-disabled,
.gam-check-chip:has(input:disabled) {
  opacity: 0.65;
  cursor: not-allowed;
}

.gam-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.gam-chip-row .gam-check-chip {
  min-width: 4.5rem;
}

.gam-custom-box {
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 0.85rem;
  background: #f8fafc;
}

.gam-custom-box textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8rem;
  border-radius: 6px;
}

.gam-custom-toggle {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
  font-weight: 500;
  color: #374151;
}

.gam-creative-size-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.7rem;
  margin-bottom: 0.4rem;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.gam-creative-size-row .name {
  flex: 1 1 10rem;
  font-weight: 500;
  color: #1f2937;
}

.gam-creative-size-row select {
  min-width: 8rem;
}
