@use './variables' as v;

// Bootstrap 5 box-shadow
// $input-focus-box-shadow: 0 0 0 0.25rem #0d6efd40 !default;

/** Bootstrap buttons styling copied and changed slightly for Material Design */
.slick-editor-modal,
.slick-large-editor-text {
  .btn {
    cursor: pointer;
    font-family: var(--slick-font-family, v.$slick-font-family);
    display: inline-block;
    margin-bottom: 0;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    border: 1px solid transparent;
    border-radius: 4px;
  }

  .btn-default {
    color: var(--slick-cell-text-color, v.$slick-cell-text-color);
    background-color: var(--slick-btn-default-bg-color, v.$slick-btn-default-bg-color);
    border-color: var(--slick-btn-default-border-color, v.$slick-btn-default-border-color);
  }

  .btn-primary {
    color: #fff;
    background-color: var(--slick-button-primary-bg-color, v.$slick-button-primary-bg-color);
  }

  .btn-xs,
  .btn-group-xs > .btn,
  .btn-sm {
    font-size: 12px;
    line-height: 1.5;
    border-radius: 3px;
  }
  .btn-xs,
  .btn-group-xs > .btn {
    padding: 1px 5px;
  }
  .btn-sm {
    padding: 5px 10px;
  }
}

.gridPane,
.grid-pane,
.slick-editor-modal {
  font-family: var(--slick-font-family, v.$slick-font-family);

  .form-control {
    display: block;
    width: 100%;
    font-size: var(--slick-font-size-base, v.$slick-font-size-base);
    line-height: 1.42857143;
    background-image: none;
    border-radius: 4px;
    background-color: var(--slick-form-control-bg-color, v.$slick-form-control-bg-color);
    border: var(--slick-form-control-border, v.$slick-form-control-border);
    color: var(--slick-font-color, v.$slick-font-color);
    transition:
      border-color ease-in-out 0.15s,
      box-shadow ease-in-out 0.15s;
  }

  .input-group .form-control {
    border-radius: 4px;
  }
  .input-group .form-control {
    position: relative;
    z-index: 2;
    float: left;
    width: 100%;
    margin-bottom: 0;
  }
  .input-group {
    position: relative;
    display: table;
    border-collapse: separate;
  }
  .input-group-addon {
    font-size: 14px;
    font-weight: 400;
    line-height: 1;
    border: var(--slick-input-group-addon-border, v.$slick-input-group-addon-border);
    color: var(--slick-input-group-addon-color, v.$slick-input-group-addon-color);
    text-align: center;
    background-color: var(--slick-input-group-addon-bg-color, v.$slick-input-group-addon-bg-color);
    border-radius: 4px;
  }
  .input-group-addon,
  .input-group-btn {
    width: 1%;
    white-space: nowrap;
    vertical-align: middle;
  }
  .input-group .form-control,
  .input-group-addon,
  .input-group-btn {
    display: table-cell;
  }
  .input-group-addon:first-child {
    border-right: 0;
  }
  .input-group-addon:last-child {
    border-left: 0;
  }
  .input-group .form-control:last-child,
  .input-group-addon:last-child,
  .input-group-btn:first-child > .btn-group:not(:first-child) > .btn,
  .input-group-btn:first-child > .btn:not(:first-child),
  .input-group-btn:last-child > .btn,
  .input-group-btn:last-child > .btn-group > .btn,
  .input-group-btn:last-child > .dropdown-toggle {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
  }
  .input-group .form-control:first-child,
  .input-group-addon:first-child,
  .input-group-btn:first-child > .btn,
  .input-group-btn:first-child > .btn-group > .btn,
  .input-group-btn:first-child > .dropdown-toggle,
  .input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),
  .input-group-btn:last-child > .btn-group:not(:last-child) > .btn {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
  }
  .input-group-btn:last-child > .btn,
  .input-group-btn:last-child > .btn-group {
    z-index: 2;
    margin-left: -1px;
  }

  .input-group-addon:not(:first-child):not(:last-child),
  .input-group-btn:not(:first-child):not(:last-child),
  .input-group .form-control:not(:first-child):not(:last-child) {
    border-radius: 0;
    border-top-left-radius: 0px;
    border-top-right-radius: 0px;
    border-bottom-right-radius: 0px;
    border-bottom-left-radius: 0px;
  }

  *,
  :after,
  :before {
    box-sizing: border-box;
  }

  .form-control:focus {
    outline: 0;
    border-color: var(--slick-form-control-focus-border-color, v.$slick-form-control-focus-border-color);
    box-shadow: var(--slick-form-control-focus-box-shadow, v.$slick-form-control-focus-box-shadow);
  }

  .slick-pagination {
    .slick-pagination-nav {
      .pagination > li {
        a,
        span {
          position: relative;
          float: left;
          margin-left: -1px;
        }
      }
      .pagination > .disabled > a,
      .pagination > .disabled > a:focus,
      .pagination > .disabled > a:hover,
      .pagination > .disabled > span,
      .pagination > .disabled > span:focus,
      .pagination > .disabled > span:hover {
        cursor: not-allowed;
      }
    }
  }
}
