/* Copyright (C) 2019 Monomax Software Pty Ltd
 *
 * This file is part of Dnote.
 *
 * Dnote is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Dnote is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with Dnote.  If not, see <https://www.gnu.org/licenses/>.
 */

@import './font';

@keyframes holderPulse {
  0% {
    opacity: 0.4;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.4;
  }
}

// placeholder frames
.holder {
  animation: holderPulse 800ms infinite;
  background: #f4f4f4;
}

input[type='text']:disabled,
input[type='email']:disabled,
input[type='number']:disabled,
input[type='password']:disabled,
textarea:disabled {
  background: #ececec;
  cursor: not-allowed;
}

// Replace the default browser outline with custom focus indicator
textarea:focus {
  outline: none;
}
input:focus {
  outline: none;
}

.list-unstyled {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

.sr-only {
  display: none;
}

.scrollbar-measure {
  position: absolute;
  top: -9999px;
  width: 50px;
  height: 50px;
  overflow: scroll;
}

.page {
  height: 100%;
  overflow-y: scroll;
}

button {
  img,
  svg {
    display: block;
  }
}

.text-input {
  border: 2px solid $border-color;
  padding: rem(4px) rem(12px);
  position: relative;
  border-radius: 2px;
  display: block;

  &::placeholder {
    color: $gray;
  }
  &:focus {
    border: 2px solid $third;
  }

  &.text-input-medium {
    padding: rem(8px) rem(12px);
  }

  &.text-input-stretch {
    width: 100%;
  }
}

.label-full {
  width: 100%;
}

a {
  color: $link;

  &:hover {
    color: $link-hover;
  }
}
