/* 
 * Copyright 2011-2025, The Trustees of Indiana University and Northwestern
 *   University.  Licensed under the Apache License, Version 2.0 (the "License");
 *   you may not use this file except in compliance with the License.
 *
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed
 *   under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 *   CONDITIONS OF ANY KIND, either express or implied. See the License for the
 *   specific language governing permissions and limitations under the License.
 * ---  END LICENSE_HEADER BLOCK  ---
*/

// Copied in from bootstrap-sass
$border-radius-base: 4px !default;

// mb-3 input fields
.mb-3 .input-group {

  .form-control {
    border-radius: 0;

    &:first-child {
      @extend .rounded-start;
    }

    &:last-child {
      @extend .rounded-end;
    }
  }

  .input-group-btn {
    vertical-align: top;
  }

  .add-dynamic-field {
    cursor: pointer;
  }
}

.mb-3.invalid-feedback {
  display: block;
  font-size: 100%;
}

.form-text {
  display: block;

  .btn-close {
    cursor: pointer;
    float: right;
  }
}

.mb-3 .input-group.typed-textarea {
  select {
    width: 100%;
    text-align: left;
    padding: 0.375rem 0.75rem;
    background-color: $white;
    border-radius: 0;
    border-top-left-radius: 0.25rem;
  }
  
  button {
    border-bottom-right-radius: 0;
  }
}

.mb-3 textarea.typed-textarea {
  border-top: none;
  border-top-right-radius: 0;
  border-top-left-radius: 0;
  margin-bottom: 2px;
}

.mb-3 label.checkbox {
  margin-left: 0.5rem !important;
  padding-right: 1rem !important;
}

/*
 * Fix that shouldn't be needed to make sure that the text behaves like a regular
 * link
 */
label {
  a[data-tooltip] {
    text-decoration: none;
  }
}

.item-access label {
  display: block;
}

.form-control {
  color: $dark;
}

.fileinput-submit {
  background-color: $blue  !important;
  border-color: $blue  !important;

  &:hover {
    background-color: shade-color($blue, 15%) !important;
  }

  color: $white  !important;
}

.upload-file-wrapper {
  padding: 5px 5px 0 5px !important;
}

#new_comment {
  .form-label {
    font-weight: bold;
  }
}

#resource-description {
  .input-group {
    flex-wrap: nowrap;

    // Override Bootstrap for resource description dropdown menus
    #media_object_other_identifier_type_,
    #media_object_bibliographic_id_label {
      border-top-right-radius: revert;
      border-bottom-right-radius: revert;
    }
  }
}

/* Add to playlist form on item-view page */
#add-to-playlist-form-group {
  .form-check {
    padding-bottom: 0.1rem;
  }

  .form-check-label {
    cursor: pointer;

    .disabled-option {
      cursor: not-allowed;
      color: $gray;
    }
  }

  #playlist_item_end, #playlist_item_start {
    border-radius: 0.25rem;
    border: 1px solid $gray;
    padding: 0 0.5rem;
  }

  #playlist_item_end:invalid:focus,
  #playlist_item_start:invalid:focus {
    color: $danger;
    box-shadow: 0 0 10px $danger;
    border: 1px solid $danger;
  }

  #playlist_item_end:valid:focus,
  #playlist_item_start:valid:focus {
    color: $dark;
    box-shadow: none;
    border: 1px solid $gray;
  }
}
