/*
 * MDB4 → MDB5 Compatibility Shim
 * --------------------------------
 * Provides MDB4 class definitions removed in MDB5 FREE 7.1.0.
 * Load AFTER mdb.min.css and BEFORE sis.css in HeadIncludes.ascx.
 *
 * Once all markup is migrated to MDB5 equivalents this file can be removed.
 */

/* =============================================
   1. .md-form  (MDB4 floating-label form group)
   ============================================= */
.md-form {
  position: relative;
  margin-top: 1.75rem;
  margin-bottom: 1.5rem;
  padding-top: 1rem; /* reserve space for the floating label */
}

/* --- input / textarea / select --- */
.md-form input:not([type=hidden]):not([type=checkbox]):not([type=radio]),
.md-form .form-control,
.md-form textarea,
.md-form select {
  box-sizing: border-box;
  width: 100%;
  background-color: transparent !important;
  border: none !important;
  border-bottom: 1px solid #ced4da !important;
  border-radius: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  padding: .3rem 0 .55rem 0 !important;
  height: auto;
  min-height: 0 !important;
  transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
  position: relative;
  z-index: 1;
}

/* --- focus underline (blue default, sis.css overrides to purple) --- */
.md-form input:not([type=hidden]):not([type=checkbox]):not([type=radio]):focus,
.md-form .form-control:focus,
.md-form textarea:focus,
.md-form select:focus {
  border-bottom: 1px solid #4285f4 !important;
  box-shadow: 0 1px 0 0 #4285f4 !important;
}

/* --- label (positioned absolutely; floats up via JS-added classes) --- */
.md-form label {
  position: absolute;
  top: 1rem;           /* aligns with input baseline (padding-top on .md-form) */
  left: 0;
  font-size: 1rem;
  color: #757575;
  cursor: text;
  transition: transform .2s ease-out, color .2s ease-out;
  transform: translateY(0);
  pointer-events: none;
  margin: 0;
  z-index: 0;
}

/* Float the label up when the form is focused OR has a value.
   These classes are toggled by the mdFormShim JS in FooterScripts. */
.md-form.md-focused label,
.md-form.md-filled label {
  transform: translateY(-100%) scale(.8);
  transform-origin: 0 0;
}

/* Prefix icon inside md-form */
.md-form .prefix {
  position: absolute;
  width: 3rem;
  font-size: 2rem;
  transition: color .2s;
  top: 1.25rem;        /* account for .md-form padding-top */
  pointer-events: none;
  z-index: 0;
}

.md-form .prefix ~ .form-control,
.md-form .prefix ~ input,
.md-form .prefix ~ textarea {
  padding-left: 3rem !important;
  width: 100%;
}

.md-form .prefix ~ label {
  left: 3rem;
}

.md-form.md-focused .prefix {
  color: #4285f4;
}

/* Small form variant */
.md-form.form-sm input:not([type=hidden]):not([type=checkbox]):not([type=radio]),
.md-form.form-sm .form-control {
  font-size: .8rem;
  padding: .2rem 0 .4rem 0 !important;
}

.md-form.form-sm label {
  font-size: .8rem;
}

.md-form.form-sm .prefix {
  font-size: 1.5rem;
  top: 1.15rem;
}

/* Also support .form-sm as a child class of md-form */
.md-form .form-control-sm,
.form-sm .form-control {
  font-size: .8rem;
}

/* =============================================
   2. .close  (Bootstrap 4 close button)
   ============================================= */
.close {
  float: right;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  color: #000;
  text-shadow: 0 1px 0 #fff;
  opacity: .5;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.close:hover,
.close:focus {
  color: #000;
  text-decoration: none;
  opacity: .75;
}

button.close {
  -webkit-appearance: none;
  appearance: none;
}

/* =============================================
   3. Color text utilities (MDB4)
   ============================================= */
.grey-text {
  color: #757575 !important;
}

.dark-grey-text {
  color: #424242 !important;
}

.deep-grey-text {
  color: #212121 !important;
}

.white-text {
  color: #fff !important;
}

.blue-text {
  color: #2196f3 !important;
}

/* =============================================
   4. .font-small (MDB4 small font utility)
   ============================================= */
.font-small {
  font-size: .9rem;
}

/* =============================================
   5. .page-footer (MDB4 footer component)
   ============================================= */
.page-footer {
  padding-top: 1rem;
  color: #fff;
}

.page-footer .footer-copyright {
  overflow: hidden;
  color: rgba(255, 255, 255, .6);
  background-color: rgba(0, 0, 0, .2);
}

/* =============================================
   6. .stylish-color-dark (MDB4 skin color)
   ============================================= */
.stylish-color-dark {
  background-color: #3e4551 !important;
}

/* =============================================
   7. .z-depth-* (MDB4 shadow/depth utilities)
   ============================================= */
.z-depth-0 {
  box-shadow: none !important;
}

.z-depth-1 {
  box-shadow: 0 2px 5px 0 rgba(0, 0, 0, .16), 0 2px 10px 0 rgba(0, 0, 0, .12) !important;
}

/* =============================================
   8. .switch / .lever (MDB4 toggle switch)
   ============================================= */
.switch,
.switch * {
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.switch label {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  font-size: .8rem;
  color: #757575;
}

.switch label input[type=checkbox] {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.switch label .lever {
  content: "";
  display: inline-block;
  position: relative;
  width: 36px;
  height: 14px;
  background-color: rgba(0,0,0,.26);
  border-radius: 15px;
  margin: 0 1rem;
  transition: background .3s ease;
  vertical-align: middle;
}

.switch label .lever:after {
  content: "";
  position: absolute;
  display: inline-block;
  width: 20px;
  height: 20px;
  background-color: #f1f1f1;
  border-radius: 50%;
  box-shadow: 0 1px 3px 1px rgba(0,0,0,.24);
  left: -1px;
  top: -3px;
  transition: left .3s ease, background .3s ease;
}

.switch label input[type=checkbox]:checked + .lever {
  background-color: rgba(66,133,244,.5);
}

.switch label input[type=checkbox]:checked + .lever:after {
  left: 18px;
  background-color: #4285f4;
}

.switch label input[type=checkbox]:disabled + .lever {
  cursor: default;
  background-color: rgba(0,0,0,.12);
}

.switch label input[type=checkbox]:disabled + .lever:after {
  background-color: #bdbdbd;
}

/* blue-white-switch color override */
.switch.blue-white-switch label input[type=checkbox]:checked + .lever:after {
  background-color: #5cb8e1;
}
.switch.blue-white-switch label .lever {
  background-color: #ccc;
}
.switch.blue-white-switch label .lever:after {
  background-color: #ccc;
}

.z-depth-1-half {
  box-shadow: 0 5px 11px 0 rgba(0, 0, 0, .18), 0 4px 15px 0 rgba(0, 0, 0, .15) !important;
}

.z-depth-2 {
  box-shadow: 0 8px 17px 0 rgba(0, 0, 0, .2), 0 6px 20px 0 rgba(0, 0, 0, .19) !important;
}

/* =============================================
   8. .waves-effect / .waves-light (MDB4 ripple)
   ============================================= */
.waves-effect {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.waves-light .waves-ripple {
  background-color: rgba(255, 255, 255, .45);
}

/* =============================================
   9. .modal-full-height / .modal-right (MDB4)
   ============================================= */
.modal-full-height {
  position: fixed;
  top: 0;
  right: 0;
  display: flex;
  width: 400px;
  height: 100%;
  margin: 0;
  max-height: 100%;
}

.modal-full-height .modal-content {
  width: 100%;
  overflow-y: auto;
}

.modal-right {
  right: 0;
}

.modal.fade .modal-dialog.modal-right {
  transform: translate3d(25%, 0, 0);
}

.modal.show .modal-dialog.modal-right {
  transform: translate3d(0, 0, 0);
}

/* =============================================
   10. .hr-light (MDB4 light horizontal rule)
   ============================================= */
.hr-light {
  border-top: 1px solid rgba(255, 255, 255, .4);
}

/* =============================================
   11. .mdb-select (MDB4 material select)
   ============================================= */
.mdb-select {
  background-color: transparent;
  border: none;
  border-bottom: 1px solid #ced4da;
  border-radius: 0;
  outline: none;
  padding: .3rem 0 .55rem 0;
  box-shadow: none;
  appearance: auto;
}

.mdb-select:focus {
  border-bottom: 1px solid #4285f4;
  box-shadow: 0 1px 0 0 #4285f4;
}
