/* =============================================================================
   FORM STYLES - Branch Selector, Radio Buttons, Form Components
   ============================================================================= */

/* Branch Selector Styles */
.branch-selector-container {
  position: relative;
}

.searchable-select {
  position: relative;
  width: 100%;
}

.branch-search-input {
  width: 100%;
  padding: 12px 40px 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 16px;
  color: #2d3748;
  background: white;
  cursor: pointer;
  transition: all 0.3s ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234a5568' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.branch-search-input:hover {
  border-color: #667eea;
}

.branch-search-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  cursor: text;
}

.branch-search-input:disabled {
  background-color: #f7fafc;
  color: #a0aec0;
  cursor: not-allowed;
}

/* Search Dropdown */
.search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 2px solid #e2e8f0;
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.search-dropdown.show {
  display: block;
}

.dropdown-option {
  padding: 12px 16px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  border-bottom: 1px solid #f7fafc;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dropdown-option:hover {
  background-color: #f7fafc;
}

.dropdown-option.selected {
  background-color: #667eea;
  color: white;
}

.dropdown-option.no-results {
  color: #a0aec0;
  cursor: default;
  font-style: italic;
}

.dropdown-option.no-results:hover {
  background-color: transparent;
}

.branch-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.branch-default-indicator {
  font-size: 12px;
  color: #10b981;
  font-weight: 600;
}

.branch-meta {
  font-size: 11px;
  color: #6b7280;
  margin-left: 8px;
}

/* Instance Type Radio Button Styles */
.instance-radio-container {
  margin-top: 8px;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: white;
}

.radio-option:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.radio-option input[type="radio"] {
  display: none;
}

.radio-custom {
  width: 20px;
  height: 20px;
  border: 2px solid #cbd5e1;
  border-radius: 50%;
  position: relative;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.radio-custom::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #3b82f6;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.2s ease;
}

.radio-option input[type="radio"]:checked + .radio-custom {
  border-color: #3b82f6;
  background: #eff6ff;
}

.radio-option input[type="radio"]:checked + .radio-custom::after {
  transform: translate(-50%, -50%) scale(1);
}

.radio-option input[type="radio"]:checked ~ .radio-label {
  color: #1e293b;
  font-weight: 600;
}

.radio-label {
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
  transition: all 0.3s ease;
  flex: 1;
}

.radio-option input[type="radio"]:checked ~ .radio-option {
  border-color: #3b82f6;
  background: #eff6ff;
}

.radio-option:has(input[type="radio"]:checked) {
  border-color: #3b82f6;
  background: #eff6ff;
}

.instance-mode-info {
  font-size: 12px;
  color: #64748b;
  margin-top: 4px;
  font-style: italic;
}