/* Default button */
.ola-btn {
  padding: 0;
  margin: 0;
  border: none;
  cursor: pointer;
  font-weight: normal;
  background: transparent;
  min-height: unset;
  line-height: 1;
  font-size: 100%;

  &:disabled{
    opacity: 0.6;
    cursor: text;
  }
}

/* Primary button */
.ola-btn-primary {
  &, &:hover, &:active, &:focus {
    background: $button-primary-background;
    color: $button-primary-color;
    padding: $button-padding;
    border: none;
    cursor: pointer;
    display: inline-block;
    border-radius: $button-border-radius;
    text-decoration: none;
  }
}

/* Primary button */

/* Common button styles */
.ola-icon-button {
  @extend %ola-icon-button;  
}

/**
 * Buttons that behave like links
 */
.ola-btn-link {
  @extend %ola-link;
}

/* Search button */
.ola-search-button {
  @extend %ola-icon-button;
  color: $button-primary-color;
  width: $button-search-width;
  &, &:hover, &:active, &:focus {
    background: $button-primary-background;
  }
}

/* Primary button */
.ola-primary-button {
  color: $button-primary-color;

  &, &:hover, &:active, &:focus {
    background: $button-primary-background;
  }
}

/* Geo location icon */
.ola-link-geo {
  @extend %ola-link;
  min-width: 40px;

  /* Icon */
  .ola-icon {
    vertical-align: middle;
  }

  /* Disabled */
  &:disabled {
    opacity: 0.6;
    cursor: text;
  }

  &.ola-link-geo-active {
    color: $button-geo-active-color;
  }

  &.ola-link-geo-requesting {
    opacity: 0.8;
  }
}

/* Geo text */
.ola-link-geo-text {
  margin-left: 8px;
}

/* bookmarking */
.ola-link-bookmark, .ola-link-bookmark-action {
  @extend %ola-icon-button;
  height: 100%; /* Its inside a flex box */
  float: right;

  &:before {
  }

  .ola-bookmarks-hasBookmarks  &, &.ola-bookmark-action-remove {
    &:before {
    }
  }

  /* Hide text */
  span {
    display: none;
  }
}

/* Clear button */
.ola-clear-button {
  @extend %ola-icon-button;
}

/* Print button */
.ola-print-button {
  @extend %ola-icon-button;
}

/* Load more */

.ola-link-load-more {
  @extend %ola-icon-button;
  @extend .ola-primary-button;
  width: 100%;
  padding: 0.8rem 1rem;
  margin-top: 1rem;
  box-shadow: $small-box-shadow;
  border: none;
  white-space: nowrap;

  .ola-icon {
    vertical-align: middle;
    margin-left: 0.5rem;
  }
}


/* Spell links */
.ola-spell-links {
  @extend %ola-icon-button;
  margin-left: 0.5rem;
}


/* regular button */
.ola-icon-btn {
  @extend %ola-icon-button;
}

/* Ola cta button */
.ola-cta-button {
  @extend .ola-btn-primary;
  width: 100%;
  @include media (tablet) {
    width: auto;
  }
}

/* Full width */
.ola-btn-fullwidth {
  width: 100%;
  text-align: center;
  display: block;
}

/* Pages */
.ola-link-view-pages, .ola-page-number {
  cursor: pointer;
}


/**
 * Close button
 */
.ola-btn-close {
  position: absolute;
  right: 12px;
  top: 12px;
  padding: 2px;
  width: 18px;
  height: 18px;
  background: #999;
  border: none;
  border-radius: 20px;
  color: white;

  &:hover {
    background: #555;
  }

  .ola-icon {
    width: 100%;
    height: 100%;
  }
}


/**
 * Wordmap
 */
.ola-button-wordmap {
  margin-right: 8px;
}

/**
 * Speech button
 */

.ola-link-speech {
  @extend .ola-icon-button;
  height: 100%;
}

/**
 * Clear all filters
 */

.ola-link-clear-filters {
  @extend .ola-icon-button;
  height: 100%;
}

/**
 * Button more
 */
.ola-answer-link-more {
  @extend .ola-btn-primary;
}

/**
 * Button play
 */
.ola-btn-play {
  @extend .ola-btn;
  // background: rgba(255,255,255,0.6);
  background: rgba(0,0,0,0.8);
  width: 80px;
  height: 80px;
  color: white;
  border-radius: 40px;
  box-shadow: $small-box-shadow;
  text-align: center;
  transition: all 0.2s ease-in;

  &:focus, &:hover {
    background: rgba(0,0,0,0.5);
  }

  .ola-answer-embed & {
    position: absolute;
    top: 50%;
    left: 50%;
    margin: -40px 0 0 -40px;
    z-index: 6;
  }
}