/* Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
   for details. All rights reserved. Use of this source code is governed by a
   BSD-style license that can be found in the LICENSE file. */

/*
 * Modal content is generated as part of the HTML page, and hidden initially.
 * The web_app code will remove it from the DOM and remove this class rule
 * before passing it to the modal window's content area.
 */
.modal-content-hidden {
  display: none;
}

#-admin-consent-buttons {
  margin-top: 36px;
}

#-admin-consent-reject-button {
  margin-right: 16px;
}

.-pub-form-checkbox-row,
.-pub-form-textfield-row {
  margin-top: 20px;
}

.-pub-form-checkbox-row {
  label {
    display: inline-block;
    margin-bottom: 6px;
  }
}

.-pub-form-textfield-row {
  label {
    display: block;
    margin-bottom: 8px;
  }

  .mdc-text-field {
    min-width: 100%;
    margin-bottom: 8px;
  }
}

.-pub-form-right-aligned {
  margin-top: 20px;
  text-align: right;
}

.-pub-form-checkbox-indent {
  margin-left: 40px;
}

.-pub-form-block-hidden {
  display: none
}

#-pub-publisher-admin-members-table {
  width: 100%;
  border-width: 0px;

  .mdc-data-table__row {
    border-top-color: var(--pub-neutral-borderColor);

    &:hover {
      background: inherit;
    }

    &:nth-child(even) {
      background: var(--pub-inset-bgColor);
    }
  }

  .mdc-data-table__header-cell,
  .mdc-data-table__cell {
    font-weight: 400;
  }

  .mdc-data-table__cell {
    color: var(--pub-neutral-textColor);
  }

  .email-header { width: 60%; }
  .role-header  { width: 30%; }
}

.-pub-remove-uploader-button,
.-pub-remove-user-button {
  border-radius: 3px;
  color: var(--pub-neutral-textColor);
  display: inline-block;
  padding: 2px 8px;

  &:hover {
    background: var(--pub-remove_button-background-color);
    color: var(--pub-remove_button-text-color);
  }
}

.-admin-dropdown {
  min-width: 225px; // ~ the width of the button that triggers the transfer
}

.detail-tab-admin-content {
  h2 {
    &:not(:first-of-type) {
      border-top: 1px solid var(--pub-neutral-borderColor);
      margin-top: 16px;
      padding-top: 16px;
    }
  }
}

.dark-theme {
  .mdc-text-field-character-counter {
    color: var(--mdc_pub-text_field-text-color);
  }

  .mdc-text-field--outlined,
  .mdc-text-field--textarea {
    .mdc-text-field__input {
      color: var(--mdc_pub-text_field-text-color);
    }

    .mdc-notched-outline__leading {
      background: var(--mdc_pub-text_field-background-color);
      border-color: var(--mdc_pub-text_field-border-color);
    }

    .mdc-notched-outline__trailing {
      background: var(--mdc_pub-text_field-background-color);
      border-color: var(--mdc_pub-text_field-border-color);
    }

    &:hover {
      .mdc-notched-outline__leading,
      .mdc-notched-outline__trailing {
        border-color: var(--pub-neutral-textColor) !important;
      }
    }
  }

  .mdc-select:not(.mdc-select--disabled) {
    .mdc-select__dropdown-icon {
      fill: var(--mdc_pub-select-label-color);
    }

    .mdc-select__selected-text {
      color: var(--mdc_pub-select-text-color);
    }

    .mdc-floating-label {
      color: var(--mdc_pub-select-label-color);
    }
  }

  .mdc-select--filled:not(.mdc-select--disabled) {
    .mdc-select__anchor {
      background-color: var(--mdc_pub-select-background-color);
    }
  }

  .mdc-data-table {
    border-color: var(--mdc_pub-data_table-border-color);
  }

  .mdc-data-table__header-cell {
    border-color: var(--mdc_pub-data_table-border-color);
    color: var(--pub-neutral-textColor);
  }
  .mdc-data-table__cell {
    color: var(--pub-neutral-textColor);
  }

  .mdc-dialog__surface {
    .mdc-dialog__title,
    .mdc-dialog__content {
      color: var(--pub-neutral-textColor);
    }
  }
}
