@import 'src/_variables.scss';
.theme-tab {
  padding-block-end: 2em;
  .theme-warning {
    display: flex;
    align-items: baseline;
    margin-block-end: .5em;
    .buttons {
      .btn {
        margin-block-end: .5em;
      }
    }
  }
  .preset-switcher {
    margin-inline-end: 1em;
  }

  .style-control {
    display: flex;
    align-items: baseline;
    margin-block-end: 5px;

    .label {
      flex: 1;
    }

    &.disabled {
      input, select {
        opacity: .5
      }
    }

    .opt {
      margin: .5em;
    }

    .color-input {
      flex: 0 0 0;
    }

    input, select {
      min-inline-size: 3em;
      margin: 0;
      flex: 0;

      &[type=number] {
        min-inline-size: 5em;
      }

      &[type=range] {
        flex: 1;
        min-inline-size: 3em;
        align-self: flex-start;
      }
    }
  }

  .reset-container {
    flex-wrap: wrap;
  }

  .fonts-container,
  .reset-container,
  .apply-container,
  .radius-container,
  .color-container,
  {
    display: flex;
  }

  .fonts-container,
  .radius-container {
    flex-direction: column;
  }

  .color-container{
    > h4 {
      inline-size: 99%;
    }
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .fonts-container,
  .color-container,
  .shadow-container,
  .radius-container,
  .presets-container {
    margin-block: 1em 0;
    margin-inline: 1em;
  }

  .tab-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    inline-size: 100%;
    min-block-size: 30px;
    margin-block-end: 1em;

    p {
      flex: 1;
      margin: 0;
      margin-inline-end: .5em;
    }
  }

  .tab-header-buttons {
    display: flex;
    flex-direction: column;

    .btn {
      min-inline-size: 1px;
      flex: 0 auto;
      padding-block: 0;
      padding-inline: 1em;
      margin-block-end: .5em;
    }
  }

  .shadow-selector {
    .override {
      flex: 1;
      margin-inline-start: .5em;
    }
    .select-container {
      margin-block-start: -4px;
      margin-block-end: -3px;
    }
  }

  .save-load,
  .save-load-options {
    display: flex;
    justify-content: center;
    align-items: baseline;
    flex-wrap: wrap;

    .presets,
    .import-export {
      margin-block-end: .5em;
    }

    .import-export {
      display: flex;
    }

    .override {
      margin-inline-start: .5em;
    }
  }

  .save-load-options {
    flex-wrap: wrap;
    margin-block-start: .5em;
    justify-content: center;
    .keep-option {
      margin-block: 0 .5em;
      margin-inline: .5em;
      min-inline-size: 25%;
    }
  }

  .preview-container {
    border-block-start: 1px dashed;
    border-block-end: 1px dashed;
    border-color: $fallback--border;
    border-color: var(--border, $fallback--border);
    margin-block: 1em;
    margin-inline: 0;
    padding: 1em;
    background-color: var(--wallpaper);
    background-image: var(--body-background-image);
    background-size: cover;
    background-position: 50% 50%;

    .dummy {
      .post {
        font-family: var(--postFont);
        display: flex;

        .content {
          flex: 1;

          h4 {
            margin-block-end: .25em;
          }

          .icons {
            margin-block-start: .5em;
            display: flex;

            i {
              margin-inline-end: 1em;
            }
          }
        }
      }

      .after-post {
        margin-block-start: 1em;
        display: flex;
        align-items: center;
      }

      .avatar, .avatar-alt{
        background: linear-gradient(135deg, #b8e1fc 0%,#a9d2f3 10%,#90bae4 25%,#90bcea 37%,#90bff0 50%,#6ba8e5 51%,#a2daf5 83%,#bdf3fd 100%);
        color: black;
        font-family: sans-serif;
        text-align: center;
        margin-inline-end: 1em;
      }

      .avatar-alt {
        flex: 0 auto;
        margin-inline-start: 28px;
        font-size: 12px;
        min-inline-size: 20px;
        min-block-size: 20px;
        line-height: 20px;
        border-radius: $fallback--avatarAltRadius;
        border-radius: var(--avatarAltRadius, $fallback--avatarAltRadius);
      }

      .avatar {
        flex: 0 auto;
        inline-size: 48px;
        block-size: 48px;
        font-size: 14px;
        line-height: 48px;
      }

      .actions {
        display: flex;
        align-items: baseline;

        .checkbox {
          display: inline-flex;
          align-items: baseline;
          margin-inline-end: 1em;
          flex: 1;
        }
      }

      .separator {
        margin: 1em;
        border-block-end: 1px solid;
        border-color: $fallback--border;
        border-color: var(--border, $fallback--border);
      }

      .btn {
        min-inline-size: 3em;
      }
    }
  }

  .radius-item,
  .color-item {
    min-inline-size: 20em;
    margin-block: 5px 0;
    margin-inline: 0 6px;
    display:flex;
    flex-direction: column;
    flex: 1 1 0;

    &.wide {
      min-inline-size: 60%
    }

    &:not(.wide):nth-child(2n+1) {
      margin-inline-end: 7px;

    }

    .color, .opacity {
      display:flex;
      align-items: baseline;
    }
  }

  .radius-item {
    flex-basis: auto;
  }

  .theme-radius-rn,
  .theme-color-cl {
    border: 0;
    box-shadow: none;
    background: transparent;
    color: var(--faint, $fallback--faint);
  }

  .theme-color-cl,
  .theme-radius-in,
  .theme-color-in {
    margin-inline-start: 4px;
  }

  .theme-radius-in {
    min-inline-size: 1em;
  }

  .theme-radius-in {
    max-inline-size: 7em;
    flex: 1;
  }

  .theme-radius-lb{
    max-inline-size: 50em;
  }

  .theme-preview-content {
    padding: 20px;
  }

  .btn {
    margin-inline-start: .25em;
    margin-inline-end: .25em;
  }
}

.extra-content {
  .apply-container {
    padding-inline-start: 15vi;
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    flex-grow: 1;
    .btn {
      flex-grow: 1;
      min-block-size: 2em;
      min-inline-size: 0;
      max-inline-size: 10em;
      padding: 0;
    }
  }
}
