/**
 * @file
 * Masquerade toolbar integration styles.
 */

body[data-meta-sidebar="open"] .toolbar-tab--masquerade {
  display: none !important;
}

.toolbar-tab--masquerade {
  position: relative;
  margin-left: auto;
  padding: 0 1rem;
  background: transparent;
}

.masquerade-toolbar-wrapper {
  display: flex;
  align-items: center;
  height: 100%;
  font-size: 0.875rem;
}

/* Top bar masquerade styles */
.top-bar__masquerade {
  display: flex;
  align-items: center;
  margin-left: 1rem;
  padding: 0 0.5rem;
}

.top-bar__masquerade form {
  display: flex;
  align-items: center;
  margin: 0;
  gap: 0.5rem;
}

.masquerade-toolbar-wrapper form {
  display: flex;
  align-items: center;
  margin: 0;
  gap: 0.5rem;
}

.masquerade-toolbar-wrapper input[type="text"],
.top-bar__masquerade input[type="text"] {
  width: 200px;
  height: 32px;
  padding: 0.25rem 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.875rem;
}

.masquerade-toolbar-wrapper input[type="submit"],
.top-bar__masquerade input[type="submit"] {
  height: 32px;
  padding: 0.25rem 0.75rem;
  background: #0073aa;
  color: white;
  border: none !important;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
  transition: background-color 0.2s;
}

.masquerade-toolbar-wrapper input[type="submit"]:hover,
.top-bar__masquerade input[type="submit"]:hover {
  background: #005a87;
  border: none !important;
}

.masquerade-toolbar-wrapper .form-item,
.top-bar__masquerade .form-item {
  margin: 0;
}

.masquerade-toolbar-wrapper label,
.top-bar__masquerade label {
  display: none;
}

.masquerade-toolbar-wrapper a,
.top-bar__masquerade a {
  color: #0073aa;
  text-decoration: none;
  padding: 0.5rem;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.masquerade-toolbar-wrapper a:hover,
.top-bar__masquerade a:hover {
  background: rgba(0, 115, 170, 0.1);
}

/* Dark theme support for Gin */
[data-gin-theme="dark"] .masquerade-toolbar-wrapper input[type="text"],
[data-gin-theme="dark"] .top-bar__masquerade input[type="text"] {
  background: #2a2a2d;
  border-color: #4a4a4d;
  color: #f0f0f0;
}

[data-gin-theme="dark"] .masquerade-toolbar-wrapper a,
[data-gin-theme="dark"] .top-bar__masquerade a {
  color: #7ab8ff;
}

[data-gin-theme="dark"] .masquerade-toolbar-wrapper a:hover,
[data-gin-theme="dark"] .top-bar__masquerade a:hover {
  background: rgba(122, 184, 255, 0.1);
}
