@import '../../_base.scss';

.page-form--customer {
  $self: '.page-form';
  padding: 20px;

  --x-color-tabs-border: #f0f0f0;

  .bp4-dark & {
    --x-color-tabs-border: var(--color-dark-gray3);
  }

  #{$self}__header {
    padding: 0;
  }
  #{$self}__primary-section {
    padding: 10px 0 0;
    margin: 0 0 20px;
    overflow: hidden;
    border-bottom: 1px solid #e4e4e4;
    max-width: 1000px;
  }

  .bp4-form-group {
    max-width: 500px;

    .bp4-control {
      margin-top: 8px;
      margin-bottom: 8px;
    }

    &.bp4-inline {
      .bp4-label {
        min-width: 150px;
      }
    }
    .bp4-form-content {
      width: 100%;
    }
  }

  .form-group--contact_name {
    max-width: 600px;

    .bp4-control-group > * {
      flex-shrink: unset;

      &:not(:last-child) {
        padding-right: 10px;
      }
      &.input-group--salutation-list {
        width: 25%;
      }
      &.input-group--first-name,
      &.input-group--last-name {
        width: 37%;
      }
    }
  }

  .bp4-form-group {
    margin-bottom: 14px;
  }

  .bp4-tab-panel {
    margin-top: 26px;
  }

  .form-group--phone-number {
    .bp4-control-group > * {
      flex-shrink: unset;
      padding-right: 5px;
      padding-left: 5px;

      &:first-child {
        padding-left: 0;
      }
      &:last-child {
        padding-right: 0;
      }
    }
  }

  #{$self}__tabs {
    margin-top: 20px;
    max-width: 1000px;

    h4 {
      font-weight: 500;
      color: #888;
      margin-bottom: 1.2rem;
      font-size: 14px;
    }
    // Tab panels.
    .tab-panel {
      &--address {
        .bp4-form-group {
          max-width: 440px;

          &.bp4-inline {
            .bp4-label {
              min-width: 145px;
            }
          }

          .bp4-form-content {
            width: 100%;
          }

          textarea.bp4-input {
            max-width: 100%;
            width: 100%;
            min-height: 50px;
          }
        }
      }
      &--note {
        .form-group--note {
          .bp4-form-group {
            max-width: 600px;
          }
          textarea {
            width: 100%;
            min-height: 100px;
          }
        }
      }
    }

    .dropzone-container {
      max-width: 600px;
    }
  }

  .bp4-tabs {
    .bp4-tab-list {
      position: relative;

      &:before {
        content: '';
        position: absolute;
        bottom: 0;
        width: 100%;
        height: 2px;
        background: var(--x-color-tabs-border);
      }

      > *:not(:last-child) {
        margin-right: 25px;
      }
      &.bp4-large > .bp4-tab {
        font-size: 15px;
      }
    }
  }
}
