@font-face {
  font-family: "Vazir";
  src: url(../fonts/Vazirmatn-Regular.woff2) format("woff2");
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: "Vazir";
  src: url(../fonts/Vazirmatn-Bold.woff2) format("woff2");
  font-weight: 600;
  font-style: normal;
}
@font-face {
  font-family: "Vazir";
  src: url(../fonts/Vazirmatn-Black.woff2) format("woff2");
  font-weight: 900;
  font-style: normal;
}
body {
  touch-action: auto;
}

.midya-reader-container {
  direction: ltr;
  width: 100%;
  max-width: none;
  margin: 0;
  background-color: #fff;
  box-shadow: none;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  font-family: "Vazir" !important;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  position: relative;
  z-index: 9990;
}

.midya-reader-header {
  padding: 15px 20px;
  background: #ffffffbd;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  direction: rtl;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.midya-reader-header h2 {
  margin: 0;
  font-size: 1.4em;
  color: #000000;
  font-weight: 500;
  font-family: "Vazir" !important;
}

.midya-header-controls {
  display: flex;
  gap: 10px;
}

.midya-reader-main {
  flex-grow: 1;
  overflow: auto;
  position: relative;
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  padding: 20px;
  background-color: #fff;
  scroll-behavior: smooth;
}

#midya-canvas {
  display: none;
  border-radius: 0;
  box-shadow: none;
  transition: opacity 0.3s ease;
  background-color: #fdf5e6;
  pointer-events: none;
}

.midya-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  z-index: 10;
  pointer-events: auto;
  touch-action: auto;
}

.midya-reader-controls {
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: #ffffffbd;
  border: 1px solid #e0e0e0;
  gap: 20px;
  direction: rtl;
  border-radius: 20px;
  width: fit-content;
  margin: 0 auto;
  position: fixed;
  bottom: 20px;
  right: 0;
  left: 0;
  z-index: 9999;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.midya-controls-group-2-title{
  font-family: "Vazir" !important;
  font-size: 33px !important;
}
.midya-controls-group {
  display: flex;
  align-items: center !important;
  gap: 12px !important;
  font-family: "Vazir" !important;
}

.midya-btn {
  background-color: #fff !important;
  border: 1px solid #d1d5db !important;
  border-radius: 8px !important;
  width: 44px !important;
  height: 44px !important;
  cursor: pointer !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  transition: all 0.2s ease !important;
  color: #000000 !important;
  padding: 0 !important;
}

.midya-btn:hover:not(:disabled) {
  background-color: #ecf5ff !important;
  border-color: #9ca3af !important;
}

.midya-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.midya-btn svg {
  width: 24px;
  height: 24px;
}

.midya-btn-fullscreen {
  display: none;
}

.midya-page-indicator {
  font-size: 1em;
  color: #000000;
  text-align: center;
  font-weight: 500;
  display: flex;
  flex-direction: row-reverse;
  gap: 2px;
}

.midya-goto-input {
  width: 180px;
  padding: 8px;
  border: 1px solid #d1d5db !important;
  border-radius: 8px !important;
  text-align: right !important;
  font-family: "Vazir", sans-serif !important;
  font-size: 0.95em;
  transition: border-color 0.2s ease;
  background-color: #ffffff;
}

.midya-goto-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.midya-goto-btn {
  transition: background-color 0.2s ease;
  height: 47.37px;
  padding: 0 30px;
  font-family: "Vazir" !important;
}

.midya-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #000000;
  font-family: "Vazir", sans-serif !important;
}

.midya-spinner {
  border: 4px solid #f0eade;
  border-top: 4px solid #3b82f6;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  animation: spin 1s linear infinite;
  margin: 0 auto 12px;
}
.icon-exit-fullscreen {
  display: none;
}
.ketabyar-audio-btn {
  display: none;
}
.ketabyar-audio-player {
  width: 100dvw;
  height: 100dvh;
  position: fixed;
  background-color: #ffffffb8;
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  top: 0;
  right: 0;
  z-index: 999999;
  display: none;
  box-sizing: border-box;
  padding: 30px;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}
.ketabyar-audio-player-header {
  text-align: left;
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
}
.ketabyar-audio-player-body {
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
}
.ketabyar-audio-player-coverbook {
  border-radius: 10px;
  max-width: 300px;
  max-height: 300px;
  box-shadow: 0px 4px 12px 0px #00000029;
}
.ketabyar-audio-player-btngroup {
  margin-top: 0px !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 30px !important;
}
.ketabyar-audio-player-btngroup button {
  width: 40px !important;
  height: 40px !important;
  background: none !important;
  border: none !important;
  cursor: pointer !important;
  padding: 0 !important;
}
.ketabyar-audio-player-booktitle {
  font-size: 22px;
  text-align: center;
  max-width: 300px;
  text-wrap: wrap;
  margin-bottom: 0;
  font-family: "Vazir" !important;
  margin-top: 20px;
  margin-bottom: 10px;
}
.ketabyar-audio-player-bookwriter {
  margin-top: 8px;
  font-size: 16px;
}
#ketabyar-audio-player-timeline {
  width: 100%;
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  background: #ddd;
  border-radius: 4px;
  outline: none;
  margin: 10px 0;
  cursor: pointer;
}
#ketabyar-audio-player-timeline::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 4px;
}
#ketabyar-audio-player-timeline::-moz-range-track {
  height: 8px;
  background: #6d6d6d;
  border-radius: 4px;
}
#ketabyar-audio-player-timeline::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: #fff;
  border: 2px solid #6d6d6d;
  border-radius: 50%;
  cursor: pointer;
  margin-top: -4px;
}
.ketabyar-audio-player-time {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding-top: 5px;
}
.ketabyar-audio-player-closebtn {
  width: 40px;
  height: 40px;
  background: none !important;
  border: none;
  cursor: pointer;
  padding: 0 !important;
}
.ketabyar-audio-player-time p {
  margin: 0;
  font-size: 15px;
  color: #626262;
}
#ketabyar-audio-player-play {
  background-color: #6d6d6d !important;
  padding: 5px !important;
  border-radius: 8px !important;
}
.ketabyar-audio-player-play {
  border-radius: 13px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 50px !important;
  height: 50px !important;
  box-shadow: 0px 4px 12px 0px #00000029;
}
.ketabyar-search-page-wrapper {
  position: relative;
}
.ketabyar-audio-player-speed {
  width: 40px;
  height: 40px;
  background: none !important;
  border: none;
  cursor: pointer;
  font-size: 18px;
  display: none;
  font-family: "Vazir";
}
.midya-controls-group-2 {
  width: 100dvw;
  height: 100dvh;
  position: fixed;
  background-color: #ffffffb8;
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  top: 0;
  right: 0;
  z-index: 999999;
  display: none;
  box-sizing: border-box;
  padding: 30px;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}
.midya-goto-input-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-direction: row-reverse;
}
.ketabyar-audio-searcher-closebtn {
  width: 40px;
  height: 40px;
  background: none !important;
  border: none;
  cursor: pointer;
  padding: 0 !important;
}
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.midya-reader-main ::selection {
  background: transparent;
}

@media (max-width: 280px) {
  .midya-page-indicator {
    display: block !important;
    font-size: 0.8em !important;
    min-width: auto !important;
  }
}

@media (max-width: 330px) {
  .midya-reader-controls {
    gap: 10px;
    padding: 7px;
  }
}

@media (max-width: 768px) {
  .midya-reader-container {
    height: 100vh;
    margin: 0;
    border-radius: 0;
  }

  /* .midya-page-indicator {
    display: none;
  } */

  .midya-reader-header {
    padding: 12px 15px;
  }

  .midya-reader-header h2 {
    font-size: 1.2em;
  }

  .midya-reader-main {
    padding: 10px;
  }

  .midya-reader-controls {
    padding: 10px 15px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .midya-controls-group {
    gap: 8px;
  }

  .midya-btn {
    width: 40px;
    height: 40px;
  }

  .midya-page-indicator {
    font-size: 1em;
  }

  .midya-goto-input {
    width: 140px;
    font-size: 0.9em;
  }
}
