/*-- scss:rules --*/
@import "ionrangeslider/_rules.scss";
@import "tables/_rules.scss";

$web-font-path: "https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,300;1,400;1,500;1,600;1,700;1,800&family=Source+Code+Pro:ital,wght@0,400;0,600;1,400;1,600&display=swap" !default;
@if $web-font-path {
  @import url($web-font-path);
}

// move checkbox and radio text slightly to the right
$bslib-checkbox-radio-margin-right: 0.35em !default;

.checkbox,
.radio {
  input {
    margin-right: $bslib-checkbox-radio-margin-right;
  }
}

// make non-selected items slightly different visually (but still 3:1 contrast)
// TODO: Restore this if we fix https://github.com/rstudio/shiny/issues/3839
// .selectize-dropdown-content .option.active {
//   background-color: tint-color($blue, 25%);
//   color: $white;
// }

// fix "to" width in the middle of the date picker
.shiny-date-range-input .input-daterange .input-group-addon {
  margin-right: -1px;
}

// Make the default action button an outline variant, but not others
.btn-outline-default,
.btn-default:not(.btn-primary, .btn-secondary, .btn-info, .btn-success, .btn-danger, .btn-warning, .btn-light, .btn-dark, .btn-link, [class*="btn-outline-"]) {
  @include button-outline-variant($secondary);
}

// This next section fixes inline checkbox and radio groups.
// TODO: It would be nice to do this for all inline groups, but that would
// require updating the input markup to use <fieldset> and <legend>.
.shiny-input-container-inline {
  .shiny-options-group {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    column-gap: 1em;

    .checkbox-inline, .radio-inline {
      position: relative;
      padding-left: calc(#{$form-check-input-width} + #{$bslib-checkbox-radio-margin-right} * 2);

      input {
        position: absolute;
        margin-top: 0;
        left: 0;
        top: calc(#{($line-height-base - $form-check-input-width) * .5} + #{$input-btn-border-width});
      }
    }
  }
}
