/* ==========================================================================
   KVK Lookup Plugin – Styles
   ========================================================================== */

/* Hidden fields (auto-hidden until filled by KVK lookup) */
.kvk-field-hidden {
  display: none !important;
}

/* Locked / read-only fields */
.kvk-locked input,
.kvk-locked textarea,
.kvk-locked select,
input.kvk-locked,
textarea.kvk-locked,
select.kvk-locked {
  background-color: #f5f5f5;
  color: #555;
  cursor: not-allowed;
  border-color: #ddd;
}

/* Status message below the search field */
.kvk-result-message {
  margin-top: 6px;
  font-size: 0.875em;
  min-height: 1.4em;
  line-height: 1.4;
}

.kvk-result-message.kvk-is-success {
  color: #1a7f37;
}

.kvk-result-message.kvk-is-error {
  color: #c0392b;
}

.kvk-result-message.kvk-is-loading {
  color: #555;
}

.kvk-result-message.kvk-is-loading::after {
  content: '';
  display: inline-block;
  width: 0.75em;
  height: 0.75em;
  margin-left: 6px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: kvk-spin 0.6s linear infinite;
  vertical-align: middle;
}

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

/* ==========================================================================
   Selection list (multiple results)
   ========================================================================== */

.kvk-selection-list {
  margin-top: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  max-height: 320px;
  overflow-y: auto;
  z-index: 9999;
}

.kvk-selection-title {
  padding: 10px 14px;
  font-size: 0.85em;
  font-weight: 600;
  color: #333;
  border-bottom: 1px solid #eee;
  background: #fafafa;
}

.kvk-selection-items {
  list-style: none;
  margin: 0;
  padding: 0;
}

.kvk-selection-item {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.15s ease;
}

.kvk-selection-item:last-child {
  border-bottom: none;
}

.kvk-selection-item:hover,
.kvk-selection-item:focus {
  background-color: #f0f7ff;
  outline: none;
}

.kvk-selection-name {
  font-weight: 600;
  font-size: 0.95em;
  color: #111;
}

.kvk-selection-details {
  font-size: 0.8em;
  color: #666;
  margin-top: 2px;
}
