/* Role Dropdown Styles */
.role-dropdown-container {
  position: relative;
}

.role-dropdown-trigger {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
}

/* Keep arrow fixed: prevent global .input-field:hover / .select-field:hover from shifting layout */
.role-dropdown-trigger:hover,
.country-dropdown-container .role-dropdown-trigger:hover {
  transform: none;
  padding-right: 0.75rem;
}

.role-dropdown-text {
  color: #000;
}

.role-dropdown-text.empty {
  color: #999;
}

.role-dropdown-arrow {
  width: 20px;
  height: 20px;
  transition: transform 0.3s;
}

.role-dropdown-arrow.open {
  transform: rotate(180deg);
}

.role-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 0.5rem;
  margin-top: 0.25rem;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.role-dropdown-loading {
  padding: 0.75rem;
  color: #999;
  text-align: center;
}

.role-dropdown-empty {
  padding: 0.75rem;
  color: #999;
}

.role-dropdown-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s;
}

.role-dropdown-option:hover {
  background-color: #e5e5e5;
}

.role-dropdown-checkbox {
  cursor: pointer;
  width: 18px;
  height: 18px;
}

.role-dropdown-label {
  flex: 1;
}

.role-dropdown-description {
  font-size: 0.85rem;
  color: #666;
}

/* Single-select option (e.g. Country dropdown) - same row style, no checkbox */
.role-dropdown-option.single-select-option {
  cursor: pointer;
}

.country-dropdown-container .role-dropdown-trigger.disabled {
  opacity: 0.65;
  cursor: not-allowed;
  pointer-events: none;
}

/* Country dropdown: search in same input (trigger is an input) */
.country-dropdown-trigger-input {
  padding: 0 0.75rem 0 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.country-dropdown-input {
  flex: 1;
  min-width: 0;
  padding: 0.75rem;
  border: none;
  background: transparent;
  font: inherit;
  color: #000;
  outline: none;
  box-shadow: none;
}

.country-dropdown-input::placeholder {
  color: #999;
}

.country-dropdown-input:focus {
  outline: none;
  box-shadow: none;
}

/* Dark theme: trigger and arrow (visible in Update User and anywhere else) */
body.night-mode .role-dropdown-trigger,
.night-mode .role-dropdown-trigger {
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.95);
}

body.night-mode .role-dropdown-trigger:hover,
.night-mode .role-dropdown-trigger:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
}

body.night-mode .role-dropdown-trigger:focus-within,
.night-mode .role-dropdown-trigger:focus-within {
  border-color: rgba(248, 113, 113, 0.6);
  background: rgba(255, 255, 255, 0.1);
}

body.night-mode .role-dropdown-text,
.night-mode .role-dropdown-text {
  color: rgba(255, 255, 255, 0.95);
}

body.night-mode .role-dropdown-text.empty,
.night-mode .role-dropdown-text.empty {
  color: rgba(255, 255, 255, 0.5);
}

body.night-mode .role-dropdown-arrow,
.night-mode .role-dropdown-arrow {
  color: rgba(255, 255, 255, 0.9);
}

/* Dark theme: country/role dropdown options panel and items */
body.night-mode .role-dropdown-menu {
  background-color: rgba(58, 56, 56, 1);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

body.night-mode .role-dropdown-option {
  border-bottom-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.95);
}

body.night-mode .role-dropdown-option:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

body.night-mode .role-dropdown-label {
  color: rgba(255, 255, 255, 0.95);
}

body.night-mode .role-dropdown-description {
  color: rgba(255, 255, 255, 0.7);
}

body.night-mode .role-dropdown-loading,
body.night-mode .role-dropdown-empty {
  color: rgba(255, 255, 255, 0.7);
}

body.night-mode .country-dropdown-input {
  color: rgba(255, 255, 255, 0.95);
}

body.night-mode .country-dropdown-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

