@use '../../../styles/_globals.scss' as *;

.page-settings {
  text-align: start;

  .settings-container {
    max-width: 100%;
  }

  .settings-title {
    margin-bottom: var(--s2);
  }

  .settings-tabs {
    ::ng-deep .mat-mdc-tab-header {
      border-bottom: 1px solid var(--divider-color);
      margin-bottom: var(--s2);
    }

    ::ng-deep .mat-mdc-tab {
      min-width: 120px;

      @include mq(md, max) {
        min-width: 48px;
        padding: 0 12px;
      }
    }

    .tab-icon {
      margin-inline-end: 8px;
      font-size: 20px;
      width: 20px;
      height: 20px;

      @include mq(md, max) {
        margin-inline-end: 0;
        font-size: 24px;
        width: 24px;
        height: 24px;
      }
    }

    .tab-label {
      @include mq(md, max) {
        display: none;
      }
    }
  }

  .tab-content {
    padding-top: var(--s2);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
  }

  collapsible {
    position: relative;
  }

  .config-section {
    border: 1px solid var(--divider-color);
    break-inside: avoid;
    margin-bottom: 10px;
    border-radius: var(--card-border-radius);
    background: var(--card-bg);

    background-color: var(--card-bg);

    .md-title {
      margin-top: 0;
    }

    ::ng-deep .collapsible-header {
      border-bottom: 1px solid transparent;
    }

    ::ng-deep .isExpanded .collapsible-header {
      font-weight: bold;

      border-color: var(--extra-border-color);
    }
  }

  .settings-col {
    margin-bottom: 30px;

    &:last-child {
      margin-bottom: 0;
    }
  }

  @include mq(xs, max) {
    .keyboard-settings {
      display: none;
    }
  }
}

.version-footer {
  margin-top: auto;
  text-align: center;
  font-style: italic;
  padding: var(--s3);
}

:host .config-section ::ng-deep {
  $this-panel-padding-left-right: 12px;

  .collapsible-header {
    font-size: 16px;
    margin-top: 0;
    padding: 10px $this-panel-padding-left-right;
  }

  .collapsible-panel {
    overflow: visible;

    > * {
      padding: 0 $this-panel-padding-left-right;
    }
  }
}
