/**
 * Copyright 2021 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

@import '../../../common/color';

.emailWrapper {
  display: flex;
  align-items: flex-end;

  :global .Field {
    padding-bottom: 0;

    &:first-child {
      flex: 1;
      margin-right: 8px;
    }
  }
}

.smsWrapper {
  display: flex;
  align-items: center;

  &:hover:not(:only-child) {
    .deleteButtonContainer {
      visibility: visible; // reveal delete button on hover
    }
  }

  // align the delete button with the field next to it
  .deleteButtonContainer {
    height: 80px;
    padding-top: 20px;
    visibility: hidden; // it is only visible when parent is hovered
  }

  :global .Field {
    padding-bottom: 0;

    &:first-child {
      flex: 1;
      margin-right: 8px;
    }
  }
}

.switchField {
  height: 36px;

  :global {
    .mdc-switch {
      margin-left: 4px; // otherwise the switch goes outside its container when off
    }
  }

  :last-child {
    margin-top: 0px;
  }
}

.error {
  height: 16px;
  display: inline-block;
}

.customAttributesWrapper {
  :global {
    label.mdc-text-field--textarea,
    textarea {
      height: 66px;
    }
  }
}

.customAttributeWrapper {
  display: flex;
}

.signInWrapper {
  :global .mdc-list-divider {
    // Negative margin to take full size
    margin: 24px -24px;

    &.bottom-divider {
      margin: -12px -24px;
    }
  }
}

.sectionHeader {
  margin-bottom: 20px;

  :global .mdc-typography--body1 {
    font-size: 16px;
    font-weight: 500;
  }
}

.sectionSubHeader {
  font-weight: 500;
  margin-bottom: 8px;
}

.showError {
  padding-bottom: 16px;
}
