/* User panel in active drawer */

.active_scene__drawer_content_column {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.active_scene__drawer_main {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.active_scene__drawer_main #submenu-view {
  flex: 1;
  min-height: 0;
}

.active_scene__user_panel_mount {
  margin-top: auto;
  padding-top: var(--space_4);
  border-top: 1px solid var(--color_border);
}

.active_scene__drawer_content_column.user-profile-is-active .active_scene__drawer_main {
  display: none !important;
}

.active_scene__drawer_content_column.user-profile-is-active .active_scene__user_panel_mount {
  border-top: none;
  padding-top: 0;
  flex: 1;
  min-height: 0;
}

.active_scene__drawer_content_column.user-profile-is-active .v2_user_panel {
  height: 100%;
}

.v2_user_panel {
  width: 100%;
  color: var(--color_text_primary);
}

.v2_user_panel__widget_view {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space_2);
}

.v2_user_panel__email {
  font-size: var(--text_sm);
  font-weight: 600;
  color: var(--color_text_primary);
  word-break: break-all;
}

.v2_user_panel__link_button {
  border: none;
  background: none;
  color: var(--color_text_secondary);
  text-decoration: underline;
  font-size: var(--text_xs);
  padding: 4px 8px;
  cursor: pointer;
}

.v2_user_panel__link_button:hover {
  color: var(--color_error);
}

.v2_user_panel__profile_button {
  border: 1px solid var(--color_border);
  border-radius: var(--radius_sm);
  background: transparent;
  color: var(--color_text_secondary);
  font-size: var(--text_xs);
  padding: 6px 10px;
  cursor: pointer;
}

.v2_user_panel__profile_button:hover {
  border-color: var(--color_silver_300);
  color: var(--color_text_primary);
}

.v2_user_panel__profile_view {
  display: none;
  flex-direction: column;
  position: relative;
  height: 100%;
  min-height: 0;
  border: 1px solid var(--color_border);
  border-radius: var(--radius_md);
  background: rgba(255, 255, 255, 0.02);
  padding: var(--space_4);
  overflow-y: auto;
}

.v2_user_panel--profile_active .v2_user_panel__widget_view {
  display: none;
}

.v2_user_panel--profile_active .v2_user_panel__profile_view {
  display: flex;
}

.v2_user_panel__title {
  margin: 0 0 var(--space_4);
  text-align: center;
  font-size: var(--text_md);
  color: var(--color_text_primary);
  padding: 0 36px;
}

.v2_user_panel__close_btn,
.v2_user_panel__edit_btn {
  position: absolute;
  top: var(--space_2);
  border-radius: var(--radius_sm);
  border: 1px solid var(--color_border);
  background: transparent;
  color: var(--color_text_secondary);
  cursor: pointer;
}

.v2_user_panel__close_btn {
  right: var(--space_2);
  width: 30px;
  height: 28px;
  line-height: 1;
  font-size: 1rem;
}

.v2_user_panel__edit_btn {
  left: var(--space_2);
  padding: 4px 8px;
  font-size: var(--text_xs);
}

.v2_user_panel__close_btn:hover,
.v2_user_panel__edit_btn:hover {
  border-color: var(--color_silver_300);
  color: var(--color_text_primary);
}

.v2_user_panel__fields {
  display: flex;
  flex-direction: column;
  gap: var(--space_3);
}

.v2_user_panel__field strong {
  display: block;
  color: var(--color_text_secondary);
  font-size: var(--text_xs);
  margin-bottom: 2px;
}

.v2_user_panel__field .display-value {
  display: block;
  color: var(--color_text_primary);
  font-size: var(--text_sm);
  word-break: break-all;
}

.v2_user_panel__field .edit-value {
  display: none;
  width: 100%;
  border: 1px solid var(--color_border);
  border-radius: var(--radius_sm);
  background: rgba(255, 255, 255, 0.06);
  color: var(--color_text_primary);
  font-size: var(--text_sm);
  padding: 8px;
}

.v2_user_panel__field select.edit-value {
  cursor: pointer;
}

.v2_user_panel__profile_view--edit_mode .display-value {
  display: none;
}

.v2_user_panel__profile_view--edit_mode .edit-value {
  display: block;
}

.v2_user_panel__profile_view--edit_mode .v2_user_panel__edit_btn {
  display: none;
}

.v2_user_panel__edit_actions {
  display: none;
  margin-top: var(--space_4);
  padding-top: var(--space_4);
  border-top: 1px solid var(--color_border);
  justify-content: flex-end;
  gap: var(--space_2);
}

.v2_user_panel__profile_view--edit_mode .v2_user_panel__edit_actions {
  display: flex;
}

.v2_user_panel__save_btn,
.v2_user_panel__cancel_btn {
  border-radius: var(--radius_sm);
  border: 1px solid var(--color_border);
  padding: 6px 12px;
  font-size: var(--text_sm);
  cursor: pointer;
}

.v2_user_panel__save_btn {
  background: var(--color_indigo_500);
  color: var(--color_text_primary);
}

.v2_user_panel__cancel_btn {
  background: transparent;
  color: var(--color_text_secondary);
}

.v2_user_panel__save_btn:hover {
  filter: brightness(1.08);
}

.v2_user_panel__cancel_btn:hover {
  border-color: var(--color_silver_300);
  color: var(--color_text_primary);
}

.v2_user_panel__status {
  min-height: 1.1rem;
  margin-top: var(--space_4);
  color: var(--color_text_secondary);
  font-size: var(--text_xs);
  text-align: center;
}

.v2_user_panel__status.is_error {
  color: var(--color_error);
}

.v2_user_panel button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
