/* Copyright 2024 The Chromium Authors
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file. */

/* #css_wrapper_metadata_start
 * #type=style-lit
 * #import=//resources/cr_elements/cr_shared_vars.css.js
 * #import=//read-anything-side-panel.top-chrome/shared/sp_shared_style.css.js
 * #scheme=relative
 * #include=sp-shared-style
 * #css_wrapper_metadata_end */

cr-icon {
  --icon-size: 20px;
  height: var(--icon-size);
  margin: 0 8px 0 4px;
  width: var(--icon-size);
}

cr-icon-button {
  --cr-icon-button-icon-size: 16px;
  --cr-icon-button-size: 24px;
  color: var(--color-sys-on-surface-subtle);
  margin: 0 4px;
}

cr-icon-button.active {
  background-color: var(--cr-active-background-color);
}

.spinner {
    display: inline-block;
    height: 100%;
    vertical-align: middle;
  }

#voiceSelectionMenu::part(dialog) {
  min-width: 304px;
  width: fit-content;
}

cr-action-menu::part(dialog) {
  max-height: calc(90% - 36px);
  /* Prevent jank due to overscrolling from the dialog */
  overscroll-behavior: contain;
  z-index: 9999;
}

/* Custom radius for non-modal submenus used in immersive reading mode */
cr-action-menu[non-modal]::part(dialog) {
  border-radius: var(--cornerRadii-medium-small, 12px);
}

.clickable-false {
  pointer-events: none;
  opacity: var(--cr-disabled-opacity);
}

.dropdown-voice-selection-button {
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding: 0 24px 0 20px;
  width: 100%;
}

.dropdown-voice-selection-button cr-icon-button {
  margin: 0;
}

.dropdown-line {
  align-items: center;
  height: 32px;
}

.check-mark {
  margin: 0;
}

.lang-group-title,
.notification {
  color: var(--color-sys-on-surface-subtle);
  display: grid;
  font-size: 12px;
  font-weight: 400;
  padding-inline-start: 20px;
}

.error-message {
  white-space: normal;
}

.voice-name {
  font-size: 13px;
  font-weight: 500;
  min-width: 200px;
  max-width: 100%;
  overflow: hidden;
  padding-inline-end: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-hidden-true {
  visibility: hidden;
}

.language-menu-button {
  font-size: 13px;
  font-weight: 500;
  height: 24px;
  margin-bottom: 3px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (forced-colors: active) {
  .dropdown-voice-selection-button {
    color: LinkText;
  }
}
