body {
    overflow-x: hidden;
    overflow-y: hidden;
}

h2 {
    margin-top: 5px;
    padding-botton: 5px;
}

button {
    margin: 2px;
    padding: 3px;
}

#flashcard-widget {
    width: 80%;
    margin: auto;
}

#flashcard-container {
    background-color: lightgray;
    padding: 20px;
    overflow: hidden;
    position: relative;
    max-width: 96%;
    height: 400px;
}

@keyframes card-slide-in {
    from {
        transform: translateX(-200%);
    } to {
        transform: translateX(0%);
    }
}

@keyframes card-slide-out {
    from {
        transform: translateX(0%);
    } to {
        transform: translateX(200%);
    }
}

@keyframes card-wrong {
    0% {
        transform: translateX(0%);
        background-color: #ffeeee;
    } 20% {
        transform: translateX(-1%);
    } 40% {
        transform: translateX(1%);
    } 60% {
        transform: translateX(-1%);
    } 80% {
        transform: translateX(1%);
        background-color: #ffeeee;
    } 100% {
        transform: translateX(0%);
        background-color: #ffffff;
    }
}

.flashcard {
    aspect-ratio: 2;
    height: 80%;
    background-color: white;
    border-radius: 10px;
    drop-shadow: 2px 2px solid gray;
    margin: auto;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 10vw;
    position: relative;
    overflow: auto;
}

.flashcard-slide-in, .flashcard-slide-out {
}

.flashcard-slide-in {
    animation: card-slide-in 0.8s;
    animation-timing-function: ease-in-out;
}

.flashcard-slide-out {
    animation: card-slide-out 0.8s;
    animation-timing-function: ease-in-out;
    background-color: #eeffee;
}

.flashcard-slide-out-unanswered {
    animation: card-slide-out 0.8s;
    animation-timing-function: ease-in-out;
}

.flashcard-incorrect {
    animation: card-wrong 0.4s;
    animation-timing-function: ease-in-out;
}

.flashcard-preview {
    margin-left: auto;
    margin-right: auto;
    max-width: 80%;
}

.card-preview-container {
    display: block;
    padding-top: 10px;
    width: 100%;
}

.answer-text-box {
    width: 70%;
    display: block;
    margin: auto;
    font-size: 20px;
    padding: 5px;
    border-radius: 5px;
    margin-top: 5px;
    margin-bottom: 5px;
}

#answer-hint {
    opacity: 50%;
    color: red;
}

.fullscreen-overlay {
    background-color: rgba(255, 255, 255, 0.8);
    z-index: 1;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    padding: 20px;
    display: none;
    overflow-x: hidden;
    overflow-y: hidden;
}

#flashcard-decklist-overlay {
    display: none;
}

.menu-overlay {
    width: 80%;
    height: 80%;
    border-radius: 10px;
    box-shadow: 5px 5px gray;
    margin: auto;
    padding: 20px;
    background-color: white;
    overflow-y: scroll;
}

.deck-editor-entry {
    margin: 10px;
    padding: 2px;
    border-radius: 10px;
    background-color: #eeeeff;
    width: 90%;
    box-shadow: 0 6px #9999aa;
    opacity: 0.8;
    display: block;
    overflow: auto;
}

.deck-editor-entry:hover {
    opacity: 1.0;
}

.deck-editor-entry a {
    line-height: 28px;
    text-align: center;
    margin-left: 10px;
    font-weight: bold;
}

.deck-editor-entry input {
    margin: 10px;
}

.deck-editor-button {
    float: right;
}

.deck-editor-button img {
    height: 12px;
}

#flashcard-deck-editor input {
    display: inline-block;
    margin: 3px;
    padding: 2px;
    border-radius: 5px;
    font-size: 14px;
}

#flashcard-deck-editor button {
    display: inline-block;
    margin: 5px;
}

#flashcard-deck-editor-close {
    display: block;
}

hr {
    display: block;
    width: 90%;
}

.deck-editor-info-entry {
    margin: 10px;
    padding: 5px;
    background-color: #eeeeee;
    box-shadow: 3px 3px #9999aa;
    border-radius: 5px;
}

.deck-menu-submenu {
    background-color: #f5f5f5;
    box-shadow: 3px 3px #9999aa;
    border-radius: 5px;
    padding: 5px;
    margin: 10px;
}

.cardlist-accordion {
    border: 1px solid black;
    background-color: #f0f0f0;
    padding-left: 5px;
    padding-top: 2px;
    padding-bottom: 2px;
    padding-right: 2px;
    margin: 2px;
    min-width: 70%;
}

.cardlist-accordion summary div input {
    display: flex;
    width: 300px;
}

.cards-left-span {
    color: #bbbbbb;
    float: left;
    position: absolute;
    bottom: 0;
    font-size: 18px;
    display: block;
    border-radius: 3px;
    padding: 3px;
    /* margin-left: 5px;
       margin-right: 5px; */
    margin-left: auto;
    margin-right: auto;
    margin-top: 3px;
    margin-bottom: 3px;
}

.cloze-puzzle-attribution {
    font-size: 14px;
    display: block;
    margin: 4px;
    padding: 4px;
    color: gray;
    position: absolute;
    bottom: 0;
    right: 0;
}

.read-aloud-button {
    aspect-ratio: 1;
    width: 100px;
    border-radius: 5px;
}

.transcription-audio-button:hover {
    border: 3px solid #eeeeff;
}

.menu-remove-card-button {
    right: 2px;
    display: inline-block;
    padding: 1px;
}

.sr-card-due-date {
    display: inline-block;
    color: lightgray;
    margin-left: 10px;
    margin-right: 10px;
    vertical-align: middle;
}

// Animation for loading icon

.lds-spinner,
.lds-spinner div,
.lds-spinner div:after {
  box-sizing: border-box;
}
.lds-spinner {
  color: currentColor;
  display: block;
  // position: absolute;
  width: 80px;
  height: 80px;
  margin-left: auto;
  margin-right: auto;
  position: absolute;
  left: 50%;
  top: 50%;
  -webkit-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
}
.lds-spinner div {
  transform-origin: 40px 40px;
  animation: lds-spinner 1.2s linear infinite;
}
.lds-spinner div:after {
  content: " ";
  display: block;
  position: absolute;
  top: 3.2px;
  left: 36.8px;
  width: 6.4px;
  height: 17.6px;
  border-radius: 20%;
  background: currentColor;
}
.lds-spinner div:nth-child(1) {
  transform: rotate(0deg);
  animation-delay: -1.1s;
}
.lds-spinner div:nth-child(2) {
  transform: rotate(30deg);
  animation-delay: -1s;
}
.lds-spinner div:nth-child(3) {
  transform: rotate(60deg);
  animation-delay: -0.9s;
}
.lds-spinner div:nth-child(4) {
  transform: rotate(90deg);
  animation-delay: -0.8s;
}
.lds-spinner div:nth-child(5) {
  transform: rotate(120deg);
  animation-delay: -0.7s;
}
.lds-spinner div:nth-child(6) {
  transform: rotate(150deg);
  animation-delay: -0.6s;
}
.lds-spinner div:nth-child(7) {
  transform: rotate(180deg);
  animation-delay: -0.5s;
}
.lds-spinner div:nth-child(8) {
  transform: rotate(210deg);
  animation-delay: -0.4s;
}
.lds-spinner div:nth-child(9) {
  transform: rotate(240deg);
  animation-delay: -0.3s;
}
.lds-spinner div:nth-child(10) {
  transform: rotate(270deg);
  animation-delay: -0.2s;
}
.lds-spinner div:nth-child(11) {
  transform: rotate(300deg);
  animation-delay: -0.1s;
}
.lds-spinner div:nth-child(12) {
  transform: rotate(330deg);
  animation-delay: 0s;
}
@keyframes lds-spinner {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
