/* AliasVault Content Script Styles */
body {
    position: absolute;
    margin: 0;
    padding: 0;
}

/* Base Popup Styles */
.av-popup {
  position: absolute;
  z-index: 2147483646;
  background-color: rgb(31, 41, 55);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  width: 320px;
  border: 1px solid rgb(55, 65, 81);
  border-radius: 4px;
  max-width: 90vw;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  font-size: 14px;
  color: #333;
  overflow: hidden;
  box-sizing: border-box;
  margin-top: 4px;
}

/* Loading Popup Styles */
.av-loading-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  gap: 8px;
}

.av-loading-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #e5e7eb;
  border-radius: 50%;
  border-top-color: transparent;
  animation: av-loading-spin 1s linear infinite;
}

@keyframes av-loading-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.av-loading-text {
  font-size: 14px;
  font-weight: 500;
  line-height: normal;
  color: #e5e7eb;
}

/* Credential List Styles */
.av-credential-list {
  max-height: 168px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #4b5563 #1f2937;
  line-height: 1.3;
}

.av-credential-item {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  transition: background-color 0.2s ease;
  border-radius: 4px;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
}

.av-credential-item:hover {
  background-color: #2d3748;
}

.av-credential-info {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-grow: 1;
  padding: 10px 16px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
  min-width: 0;
}

.av-credential-logo {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.av-credential-text {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-width: 0;
  margin-right: 8px;
}

.av-service-name {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  color: #f3f4f6;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.av-suggested-names {
  margin-top: 4px;
  font-size: 12px;
  color: #acacac;
}
.av-suggested-name {
  color: #bababa;
  cursor: pointer;
  text-decoration: underline;
}
.av-suggested-name:hover {
  color: #d68338;
}

.av-service-details {
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #9ca3af;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.av-popout-icon {
  display: flex;
  align-items: center;
  padding: 4px;
  margin-right: 16px;
  opacity: 0.6;
  border-radius: 4px;
  flex-shrink: 0;
  color: #ffffff;
  transition: opacity 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.av-popout-icon:hover {
  opacity: 1;
  background-color: #ffffff;
  color: #000000;
}

.av-no-matches {
  padding-left: 10px;
  padding-top: 8px;
  padding-bottom: 8px;
  font-size: 14px;
  color: #9ca3af;
  font-style: italic;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  text-align: left;
}

.av-passkey-hint {
  padding: 10px 16px 6px 16px;
  font-size: 13px;
  color: #9ca3af;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.av-passkey-list {
  max-height: 202px;
}

.av-pill-nav {
  display: flex;
  border-bottom: 1px solid #374151;
}

.av-pill {
  flex: 1;
  min-width: 0;
  padding: 14px 12px;
  border: none;
  /* Transparent underline that becomes the active indicator; -1px margin overlaps the nav border. */
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  border-radius: 0;
  background: transparent;
  color: #9ca3af;
  font-size: 13px;
  font-weight: 500;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.av-pill:hover {
  color: #f3f4f6;
}

.av-pill-active,
.av-pill-active:hover {
  border-bottom-color: #f49541;
  color: #f49541;
}

/* Divider */
.av-divider {
  height: 1px;
  background: #374151;
  margin-bottom: 8px;
}

/* Action Container */
.av-action-container {
  display: flex;
  padding-left: 8px;
  padding-right: 8px;
  padding-bottom: 8px;
  gap: 8px;
}

/* Button Styles */
.av-button {
  padding: 6px 12px;
  border-radius: 4px;
  background: #374151;
  color: #e5e7eb;
  font-size: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  cursor: pointer;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: background-color 0.2s ease;
  min-width: 0px;
}

.av-button:hover {
  background-color: #4b5563;
}

.av-button-primary {
  background-color: #374151;
}

.av-button-primary:hover {
  background-color: #d68338;
}

.av-button-close {
  padding: 6px;
}

.av-button-close:hover {
  background-color: #dc2626;
  color: #ffffff;
}

/* Search Input */
.av-search-input {
  flex: 1;
  border-radius: 4px;
  background: #374151;
  color: #e5e7eb;
  font-size: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  border: 1px solid #4b5563;
  outline: none;
  line-height: 1;
  padding: 8px 12px;
  padding-right: 0;
}

.av-search-input::placeholder {
  color: #bdbebe;
  opacity: 1;
}

.av-search-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

/* Vault Locked Popup */
.av-vault-locked {
  padding: 12px 16px;
  position: relative;
}

.av-vault-locked:hover {
  background-color: #374151;
}

.av-vault-locked-container {
  display: flex;
  align-items: center;
  padding-right: 32px;
  width: 100%;
  transition: background-color 0.2s ease;
  border-radius: 4px;
}

.av-vault-locked-message {
  color: #d1d5db;
  font-size: 14px;
  flex-grow: 1;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.av-vault-locked-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  padding-right: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d68338;
  border-radius: 4px;
  margin-left: 8px;
}

.av-vault-locked-close {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  padding: 4px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  border: 1px solid #6f6f6f;
}

/* Upgrade Required Popup */
.av-upgrade-required {
  padding: 12px 16px;
  position: relative;
}

.av-upgrade-required:hover {
  background-color: #374151;
}

.av-upgrade-required-container {
  display: flex;
  align-items: center;
  padding-right: 32px;
  width: 100%;
  transition: background-color 0.2s ease;
  border-radius: 4px;
}

.av-upgrade-required-message {
  color: #d1d5db;
  font-size: 14px;
  flex-grow: 1;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.av-upgrade-required-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  padding-right: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f59e0b;
  border-radius: 4px;
  margin-left: 8px;
}

.av-upgrade-required-close {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  padding: 4px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  border: 1px solid #6f6f6f;
}

.av-icon-upgrade {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Create Name Popup */
.av-create-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2147483647;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 8px 0;
  box-sizing: border-box;
}

.av-create-popup {
  position: relative;
  z-index: 1000000000;
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
              0 2px 4px -1px rgba(0, 0, 0, 0.06),
              0 20px 25px -5px rgba(0, 0, 0, 0.1);
  width: 400px;
  max-width: 90vw;
  max-height: calc(100vh - 16px);
  margin: auto;
  overflow-y: auto;
  transform: scale(0.95);
  opacity: 0;
  padding: 16px 24px;
  box-sizing: border-box;
  transition: transform 0.2s ease, opacity 0.2s ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  scrollbar-width: thin;
}

.av-create-popup.show {
  transform: scale(1);
  opacity: 1;
}

.av-create-popup-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #f8f9fa;
}

.av-create-popup-help-text {
  margin: 4px 0 0;
  font-size: 13px;
  color: #9ca3af;
  text-align: center;
  line-height: 1.4;
  padding: 0 16px;
}

.av-create-popup-modes {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 10px;
}

.av-create-popup-mode-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px;
  background: #374151;
  border: 1px solid #4b5563;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  width: 100%;
}

.av-create-popup-mode-btn:hover {
  background: #4b5563;
  transform: translateY(-1px);
}

.av-create-popup-mode-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: #1f2937;
  border-radius: 8px;
  color: #d68338;
}

.av-create-popup-mode-icon .av-icon {
  width: 24px;
  height: 24px;
}

.av-create-popup-mode-content {
  flex: 1;
}

.av-create-popup-mode-content h4 {
  margin: 0 0 4px 0;
  font-size: 16px;
  font-weight: 600;
  color: #f8f9fa;
}

.av-create-popup-mode-content p {
  margin: 0;
  font-size: 14px;
  color: #9ca3af;
}

.av-create-popup-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #374151;
  border-radius: 6px;
  background: #374151;
  color: #f8f9fa;
  font-size: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.av-create-popup-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.av-create-popup-input-default {
  color: #737373;
}

/* Custom Credential UI Styles */
.av-create-popup-custom-toggle {
  margin: 16px 0;
  padding: 0 16px;
}

.av-create-popup-toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.av-create-popup-toggle-text {
  font-size: 14px;
  color: #4b5563;
}

.av-create-popup-custom-fields {
  margin: 16px 0;
  padding: 0 16px;
}

.av-create-popup-field-group {
  margin-top: 16px;
}

.av-create-popup-field-group label {
  display: block;
  margin-bottom: 8px;
  color: #eee;
  font-size: 14px;
  font-weight: 500;
}

.av-create-popup-input-error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 1px #ef4444 !important;
}

/* Field Suggestions - Pill Style */
.av-field-suggestions {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.av-suggestion-pill {
  display: inline-flex;
  align-items: center;
  background: #4b5563;
  border: 1px solid #6b7280;
  border-radius: 16px;
  padding: 4px 8px 4px 12px;
  font-size: 13px;
  color: #e5e7eb;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.av-suggestion-pill:hover {
  background: #6b7280;
  border-color: #9ca3af;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.av-suggestion-pill-text {
  display: inline-block;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.av-suggestion-pill-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  padding: 0 2px;
  color: #9ca3af;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s;
  border-left: 1px solid #6b7280;
  padding-left: 6px;
}

.av-suggestion-pill-delete:hover {
  color: #ef4444;
}

.av-create-popup-error-text {
  color: #ef4444;
  font-size: 14px;
  margin-top: 4px;
  margin-left: 5px;
}

.av-create-popup-password-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.av-create-popup-password-preview input {
  flex: 1;
  width: 100%;
}

.av-create-popup-regenerate-btn,
.av-create-popup-visibility-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 9px;
  background: #374151;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  color: #e5e7eb;
  transition: background-color 0.2s ease;
  flex-shrink: 0;
}

.av-create-popup-regenerate-btn:hover,
.av-create-popup-visibility-btn:hover {
  background-color: #4b5563;
}

.av-create-popup-regenerate-btn .av-icon {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.av-create-popup-visibility-btn .av-icon {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
}

.av-create-popup-error {
  margin-top: 16px;
  padding: 8px 12px;
  background-color: #fee2e2;
  color: #dc2626;
  border-radius: 4px;
  font-size: 14px;
  animation: fadeIn 0.2s ease-in-out;
}

.av-create-popup-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

.av-create-popup-back {
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid #374151;
  background: transparent;
  color: #f8f9fa;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.av-create-popup-back:hover {
  background: #374151;
}

.av-create-popup-cancel {
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid #374151;
  background: transparent;
  color: #f8f9fa;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.av-create-popup-cancel:hover {
  background: #374151;
}

.av-create-popup-save {
  padding: 8px 16px;
  border-radius: 6px;
  border: none;
  background: #d68338;
  color: white;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.av-create-popup-save:hover {
  background: #c97731;
  transform: translateY(-1px);
}

/* SVG Icons */
.av-icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.av-icon-lock {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Form Icon Styles */
.av-overlay-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2147483640;
}

.av-input-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  cursor: pointer;
  width: 24px;
  height: 24px;
  pointer-events: auto;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOut {
  0% { opacity: 1; transform: scale(1.02); }
  100% { opacity: 0; transform: scale(1); }
}

/* Create Popup Styles */
.av-create-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.av-create-popup-title-container {
  display: flex;
  align-items: center;
  flex: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background-color 0.2s;
  position: relative;
}

.av-create-popup-title-wrapper {
  position: absolute;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #d68338;
  pointer-events: none;
}

.av-create-popup-header-buttons {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}


.av-create-popup-title-wrapper .av-icon {
  width: 20px;
  height: 20px;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: auto;
}

.av-create-popup-title-wrapper .av-create-popup-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #f8f9fa;
  pointer-events: auto;
}

.av-create-popup-title-container:hover {
  background-color: #374151;
}

.av-create-popup-mode-dropdown {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: #9ca3af;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.av-create-popup-mode-dropdown:hover {
  background-color: #4b5563;
}

.av-create-popup-mode-dropdown .av-icon {
  width: 16px;
  height: 16px;
}

.av-create-popup-popout {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: #9ca3af;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background-color 0.2s, color 0.2s;
}

.av-create-popup-popout:hover {
  background-color: #4b5563;
  color: #d68338;
}

.av-create-popup-popout .av-icon {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.av-create-popup-mode-dropdown-menu {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  z-index: 1000;
  min-width: 280px;
}

.av-create-popup-mode-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  width: 12px;
  height: 12px;
  background: #1f2937;
  border-left: 1px solid #374151;
  border-top: 1px solid #374151;
  transform: translateX(-50%) rotate(45deg);
}

.av-create-popup-mode-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  width: 100%;
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.2s;
  position: relative;
  z-index: 100;
}

.av-create-popup-mode-option:hover {
  background-color: #374151;
}

.av-create-popup-mode-option .av-create-popup-mode-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background-color: #374151;
  border-radius: 8px;
  color: #d68338;
}

.av-create-popup-mode-option .av-create-popup-mode-content {
  flex: 1;
}

.av-create-popup-mode-option .av-create-popup-mode-content h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #f8f9fa;
}

.av-create-popup-mode-option .av-create-popup-mode-content p {
  margin: 4px 0 0;
  font-size: 12px;
  color: #9ca3af;
}

/* Context Menu */
.av-context-menu {
  position: fixed;
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 6px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
              0 2px 4px -1px rgba(0, 0, 0, 0.06);
  z-index: 2147483647;
  min-width: 180px;
  padding: 4px;
  margin-top: 4px;
}

.av-context-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  border: none;
  background: none;
  color: #e5e7eb;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.2s;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.av-context-menu-item:hover {
  background-color: #374151;
}

.av-context-menu-item .av-icon {
  width: 16px;
  height: 16px;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Password Configuration Styles */
.av-password-length-container {
  margin-top: 12px;
  padding-top: 8px;
}

.av-password-length-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.av-password-length-header label {
  font-size: 14px;
  font-weight: 500;
  color: #9ca3af;
  margin: 0;
}

.av-password-length-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.av-password-length-value {
  font-size: 14px;
  color: #e5e7eb;
  font-family: 'Courier New', monospace;
  min-width: 24px;
  text-align: center;
}

.av-password-config-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  background: none;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  color: #9ca3af;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.av-password-config-btn:hover {
  color: #e5e7eb;
  background-color: rgba(75, 85, 99, 0.3);
}

.av-password-config-btn .av-icon {
  width: 16px;
  height: 16px;
}

.av-password-length-slider {
  width: 100%;
  height: 8px;
  background: #374151;
  border-radius: 4px;
  appearance: none;
  cursor: pointer;
  outline: none;
}

.av-password-length-slider::-webkit-slider-thumb {
  appearance: none;
  height: 16px;
  width: 16px;
  border-radius: 50%;
  background: #d68338;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.av-password-length-slider::-moz-range-thumb {
  height: 16px;
  width: 16px;
  border-radius: 50%;
  background: #d68338;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Password Config Dialog */
.av-password-config-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 2147483647;
  display: flex;
  align-items: center;
  justify-content: center;
}

.av-password-config-dialog {
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 8px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  width: 400px;
  max-width: 90vw;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.av-password-config-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #374151;
}

.av-password-config-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #f8f9fa;
}

.av-password-config-close {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: #9ca3af;
  border-radius: 4px;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.av-password-config-close:hover {
  color: #e5e7eb;
  background-color: #374151;
}

.av-password-config-close .av-icon {
  width: 16px;
  height: 16px;
}

.av-password-config-content {
  padding: 20px;
}

.av-password-preview-section {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.av-password-config-preview {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #374151;
  border-radius: 6px;
  background: #374151;
  color: #f8f9fa;
  font-size: 14px;
  font-family: 'Courier New', monospace;
  outline: none;
}

.av-password-config-refresh {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  background: #374151;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  color: #e5e7eb;
  transition: background-color 0.2s ease;
}

.av-password-config-refresh:hover {
  background-color: #4b5563;
}

.av-password-config-refresh .av-icon {
  width: 16px;
  height: 16px;
}

.av-password-config-options {
  margin-bottom: 20px;
}

.av-password-config-toggles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.av-password-config-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  background: #374151;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  color: #9ca3af;
  transition: all 0.2s ease;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  font-weight: 500;
}

.av-password-config-toggle:hover {
  background-color: #4b5563;
}

.av-password-config-toggle.active {
  background-color: #d68338;
  color: white;
}

.av-password-config-toggle.active:hover {
  background-color: #c97731;
}

.av-password-config-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
}

.av-password-config-checkbox label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #e5e7eb;
  margin: 0;
}

.av-password-config-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #d68338;
  cursor: pointer;
}

.av-password-config-actions {
  display: flex;
  justify-content: flex-end;
}

.av-password-config-use {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  background: #6b7280;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  color: white;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

.av-password-config-use:hover {
  background-color: #4b5563;
}

.av-password-config-use .av-icon {
  width: 16px;
  height: 16px;
}

/* Save Prompt Banner Styles */
.av-save-prompt {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2147483647;
  transform: translateY(-100%);
  transition: transform 0.2s ease-out;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.av-save-prompt--visible {
  transform: translateY(0);
}

.av-save-prompt__content {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  border-bottom: 1px solid #374151;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.av-save-prompt__icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.av-save-prompt__icon svg {
  width: 100%;
  height: 100%;
}

.av-save-prompt__title {
  font-size: 14px;
  font-weight: 600;
  color: #f8f9fa;
  white-space: nowrap;
  flex-shrink: 0;
}

.av-save-prompt__fields {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.av-save-prompt__service-input {
  width: 140px;
  padding: 5px 10px;
  border: 1px solid #4b5563;
  border-radius: 4px;
  background: #374151;
  color: #f8f9fa;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
  flex-shrink: 0;
}

.av-save-prompt__service-input:focus {
  border-color: #d68338;
  box-shadow: 0 0 0 2px rgba(214, 131, 56, 0.2);
}

.av-save-prompt__username {
  color: #9ca3af;
  font-size: 13px;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.av-save-prompt__password {
  color: #6b7280;
  font-size: 13px;
  font-family: monospace;
  letter-spacing: 1px;
}

.av-save-prompt__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.av-save-prompt__btn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.av-save-prompt__btn:hover {
  transform: translateY(-1px);
}

.av-save-prompt__btn:active {
  transform: translateY(0);
}

.av-save-prompt__btn--save {
  background: #d68338;
  color: white;
}

.av-save-prompt__btn--save:hover {
  background: #c97731;
}

.av-save-prompt__btn--never {
  background: #374151;
  color: #9ca3af;
}

.av-save-prompt__btn--never:hover {
  background: #4b5563;
  color: #e5e7eb;
}

.av-save-prompt__btn--dismiss {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  background: transparent;
  color: #6b7280;
}

.av-save-prompt__btn--dismiss:hover {
  background: #374151;
  color: #9ca3af;
}

.av-save-prompt__btn--dismiss svg {
  width: 16px;
  height: 16px;
}

/* Save Prompt Countdown Bar */
.av-save-prompt__countdown {
  height: 3px;
  background: rgba(75, 85, 99, 0.5);
}

.av-save-prompt__countdown-bar {
  height: 100%;
  width: 100%;
  background: #d68338;
}

/* Add URL Prompt Specific Styles */
.av-save-prompt__add-url-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.av-save-prompt__url-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: #065f46;
  border: 1px solid #059669;
  border-radius: 16px;
  color: #6ee7b7;
  font-size: 13px;
  font-weight: 500;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.av-save-prompt__plus-icon {
  flex-shrink: 0;
  color: #6ee7b7;
}

.av-save-prompt__url-arrow {
  color: #6b7280;
  font-size: 16px;
  flex-shrink: 0;
}

.av-save-prompt__credential-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: #374151;
  border: 1px solid #4b5563;
  border-radius: 16px;
  color: #f3f4f6;
  font-size: 13px;
  font-weight: 500;
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.av-save-prompt__credential-favicon {
  flex-shrink: 0;
  border-radius: 2px;
}

.av-save-prompt__btn--add-url {
  background: #059669;
  color: white;
}

.av-save-prompt__btn--add-url:hover {
  background: #047857;
}

/* Responsive Save Prompt - Medium screens */
@media (max-width: 700px) {
  .av-save-prompt__content {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px;
  }

  .av-save-prompt__icon {
    width: 24px;
    height: 24px;
  }

  .av-save-prompt__title {
    white-space: normal;
  }

  .av-save-prompt__fields {
    flex: 1;
    min-width: 0;
  }

  .av-save-prompt__service-input {
    width: 100%;
  }

  .av-save-prompt__actions {
    flex-wrap: wrap;
    gap: 6px;
  }

  .av-save-prompt__btn {
    padding: 6px 10px;
    font-size: 12px;
  }

  .av-save-prompt__btn--dismiss {
    padding: 6px;
  }

  /* Add URL prompt on small screens */
  .av-save-prompt__add-url-info {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .av-save-prompt__url-pill,
  .av-save-prompt__credential-pill {
    max-width: 100%;
  }

  .av-save-prompt__url-arrow {
    transform: rotate(90deg);
  }
}