.dmsy {
  --dmsy-black-rgb: 0, 0, 0;
  --dmsy-white-rgb: 255, 255, 255;
  --dmsy-gray-rgb: 85, 85, 85;

  --dmsy-black: rgb(var(--dmsy-black-rgb));
  --dmsy-white: rgb(var(--dmsy-white-rgb));
  --dmsy-gray: rgb(var(--dmsy-gray-rgb));
  --dmsy-text: #3c434a;

  &-upgrader {
    background: #d9d9d96e;
    z-index: 99;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    left: 0;
    
    p {
      max-width: 70%;
    }
    
  }
  
  &-accordion {
    background-color: var(--dmsy-white);

    &:not(:first-child) {
      border-top: 1px solid rgba(var(--dmsy-black-rgb), 0.2);
    }

    &-header {
      width: 100%;
      min-height: 32px;
    }

    &-toggle {
      width: 100%;
      height: 100%;
      display: flex;
      padding: 16px;
      background-color: var(--dmsy-white);
      border: none;
      border-radius: 0;
      box-shadow: none;
      cursor: pointer;

      span {
        min-width: 0;
        flex: 1 0 0;
        display: block;
        padding-right: 8px;
        font-size: 14px;
        font-weight: 500;
        color: var(--dmsy-gray);
        white-space: nowrap;
        text-align: left;
        text-overflow: ellipsis;
        overflow: hidden;
      }

      svg {
        flex: 0 0 auto;
        width: 24px;
        height: auto;
        display: block;
        fill: var(--dmsy-gray);
      }
    }

    &-body {
      max-height: 0;
      overflow: hidden;

      &-in {
        padding-top: 4px;
      }
    }

    &.opened &-toggle {
      svg {
        transform: scaleY(-1);
      }
    }

    &.opened &-body {
      max-height: unset;
    }
    
    &.popup-behind label {
      opacity: 0.3;  
    }
    
    &.popup-behind input {
      opacity: .7;
    }
  }

  &-tabs {
    max-width: 600px;
    padding: 0;
    background-color: var(--dmsy-white);

    &-in {
      display: flex;
      align-items: flex-end;
      flex-wrap: wrap;
      flex-flow: wrap-reverse;
      margin: 0 1px 0 0;
      padding: 0 0 0 16px;
    }

    &-item {
      position: relative;
      height: 32px;
      margin-left: -1px;
      margin-bottom: -1px;
      box-shadow: 0 0 4px 0 rgba(var(--dmsy-black-rgb), .1);
      text-align: center;
      background-color: #f8f8f8;

      a {
        height: 32px;
        display: flex;
        align-items: center;
        padding: 0 8px;
        border: 1px solid rgba(var(--dmsy-black-rgb), .2);
        border-bottom: 2px transparent;
        color: #0073aa;
        text-decoration: none;

        &:focus {
          box-shadow: none;
        }
      }

      &.active {
        height: 36px;
        margin-top: -4px;
        background-color: #fff;
        border-bottom: 2px transparent;
        box-shadow: none;
        z-index: 13;

        a {
          height: 36px;
          color: #444;
        }
      }
    }

    &-icon {
      margin-right: 8px;
    }

    &-body {
      position: relative;
      width: 100%;
      max-width: 600px;
      height: auto;
      min-height: 100%;
      display: none;
      background-color: var(--dmsy-white);
      border-top: 1px solid rgba(var(--dmsy-black-rgb), .2);
      z-index: 12;

      &.active {
        display: block;
        padding: 16px;
      }
    }

    &-group {
      &:not(:first-child) {
        padding-top: 16px;
      }

      &:not(:last-child) {
        position: relative;
        padding-bottom: 16px;

        &:after {
          content: '';
          position: absolute;
          right: -16px;
          bottom: 0;
          left: -16px;
          height: 1px;
          background-color: rgba(var(--dmsy-black-rgb), 0.2);
        }
      }
    }

    &-row {

    }

    &-input {
      &-holder {
        .dmsy-tabs-input {
          width: 100%;
          min-height: 34px;
          padding: 0 8px;
          background-color: var(--dmsy-white);
          box-shadow: rgba(var(--dmsy-black-rgb), 0.07) 0 1px 2px inset;
          border: 1px solid rgb(221, 221, 221);
          border-radius: 0;
          font-size: 13px;
          color: #2c3338;

          &:focus {
            border-color: rgb(91, 157, 217);
            box-shadow: rgba(30, 140, 190, 0.8) 0 0 2px;
          }
        }
      }

      &-label {
        display: block;
        padding-bottom: 6px;
        font-size: 14px;
        font-weight: 600;
        color: var(--dmsy-text);
      }
    }

    &-upload {
      &-image {
        max-width: 100%;
        min-height: 165px;
        max-height: 200px;
        display: block;
        margin-top: 14px;
        padding: 0;
        border: 1px solid rgba(0,0,0,.2);
        object-fit: cover;
        overflow: hidden;

        &-remove {
          margin-left: 21px;
        }
      }

      &-button {
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 10px 12px 12px;
        border-radius: 4px;
        background-color: #f7f7f7;
        border: 1px solid rgba(var(--dmsy-black-rgb), .2);
        box-shadow: inset 0 -2px 0 rgba(var(--dmsy-black-rgb), .1);
        font-size: 14px;
        color: #303030;
        line-height: 1.2;
        text-decoration: none;
        transition: background-color .15s ease-out 0s;
        cursor: pointer;
      }
    }
  }
}