/* Custom Overrides for Quran Pro */

/* ===== Olive Color Palette ===== */
:root {
  --olive-50: #f8f9f0;
  --olive-100: #eef0dc;
  --olive-200: #dde2ba;
  --olive-300: #c8d093;
  --olive-400: #b4be6f;
  --olive-500: #9ba855;
  --olive-600: #7a8642;
  --olive-700: #5d6738;
  --olive-800: #4a5230;
  --olive-900: #3e452b;

  /* Global Color Override */
  --ast-global-color-0: var(--olive-600);
}

/* Enhanced Header Styles */
.header-title-enhanced {
  font-family: "Amiri", "Traditional Arabic", serif;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  letter-spacing: 0.05em;
}

.header-subtitle-enhanced {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  letter-spacing: 0.02em;
  font-weight: 500;
}

/* Floating Animation for Icon */
@keyframes float-icon {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-5px) rotate(2deg);
  }
}

.icon-float {
  animation: float-icon 4s ease-in-out infinite;
}

/* Premium Favorites Button */
.btn-favorites-premium {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.15),
    rgba(255, 255, 255, 0.05)
  );
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn-favorites-premium::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: 0.5s;
}

.btn-favorites-premium:hover::before {
  left: 100%;
}

.btn-favorites-premium:hover {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.25),
    rgba(255, 255, 255, 0.1)
  );
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
}

/* ===== Enhanced Animations ===== */
@keyframes pulse-glow {
  0%,
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 8px rgba(155, 168, 85, 0.4));
  }
  50% {
    transform: scale(1.05);
    filter: drop-shadow(0 0 16px rgba(155, 168, 85, 0.6));
  }
}

@keyframes gentle-bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

.quran-icon-animated {
  animation: pulse-glow 3s ease-in-out infinite;
}

.favorites-btn-enhanced {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--olive-600), var(--olive-700));
  transition: all 0.3s ease;
}

.favorites-btn-enhanced::before {
  content: "";
  position: absolute;
  top: 0;
  left: -200%;
  width: 200%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.favorites-btn-enhanced:hover::before {
  left: 200%;
}

.favorites-btn-enhanced:hover {
  background: linear-gradient(135deg, var(--olive-700), var(--olive-800));
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(122, 134, 66, 0.3);
}

/* Font Size Increase */
.font-quran {
  font-family: "Amiri", "Traditional Arabic", serif;
  line-height: 2.5;
}

#quran-pro-verses-text .verse-item {
  font-size: 2.2rem !important;
  line-height: 3 !important;
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
  width: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #059669, #16a34a);
  border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, #047857, #15803d);
}

/* Favorites Panel Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(50px) scale(0.95);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

#quran-pro-favorites-panel {
  animation: fadeIn 0.3s ease-out;
}

#quran-pro-favorites-panel > div {
  animation: slideUp 0.3s ease-out;
}

/* Collapsible Sections Animation */
.transition-all {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Button Hover Effects */
.hover-lift:hover {
  transform: translateY(-2px);
}

/* Pagination Controls */
.pagination-btn {
  transition: all 0.2s;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Range Slider Styling */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(to bottom right, #059669, #16a34a);
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(to bottom right, #059669, #16a34a);
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  border: none;
}

/* Verse Actions Popup - Using inline styles from app.js */

/* Smooth Transitions */
* {
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Loading State */
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Juz Button Active State */
.juz-btn.active {
  background: linear-gradient(to bottom right, #059669, #16a34a) !important;
  color: white !important;
  box-shadow: 0 4px 6px rgba(5, 150, 105, 0.3);
}

/* Better spacing for icons */
.fa,
.fas,
.far,
.fal,
.fab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Improve button spacing */
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

/* Fix select dropdown arrow */
select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23059669' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: left 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-left: 2.5rem;
}

/* ===== Enhanced UI Improvements ===== */

/* Surah Header - White text for details */
#quran-pro-surah-header .text-amber-300,
#quran-pro-surah-header .bg-amber-500\/20 {
  color: white !important;
}

/* Ensure RTL text for verses */
.font-quran,
#quran-pro-verses-text .verse-item {
  direction: rtl;
  text-align: right;
}

/* Enhanced verse content styling */
#quran-pro-verses-text .verse-item {
  line-height: 3.5 !important;
  font-size: 2.2rem !important;
  margin-bottom: 1rem;
  display: inline-block;
}

/* Verse action buttons styling - Using inline styles from app.js */

/* Improved favorites panel styling */
#quran-pro-favorites-list .bg-gradient-to-r {
  padding: 1rem;
  border-radius: 1rem;
  border: 2px solid #d1fae5;
  transition: all 0.3s ease;
  margin-bottom: 0.75rem;
}

#quran-pro-favorites-list .bg-gradient-to-r:hover {
  border-color: #10b981;
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.15);
  transform: translateY(-2px);
}

/* Enhanced favorite action buttons */
#quran-pro-favorites-list button {
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.2);
  padding: 0.5rem;
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

#quran-pro-favorites-list button:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Footer styling enhancement */
footer .text-white {
  color: white !important;
}

footer .text-center {
  text-align: center !important;
}

/* Juz dropdown number boxes enhancement */
#quran-pro-juz-list button {
  padding: 0.75rem 0.5rem;
  border-radius: 0.75rem;
  font-weight: 700;
  transition: all 0.3s ease;
  background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

#quran-pro-juz-list button:hover {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border-color: #10b981;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

#quran-pro-juz-list button.active {
  background: linear-gradient(135deg, #059669, #047857);
  color: white;
  border-color: #059669;
  box-shadow: 0 4px 15px rgba(5, 150, 105, 0.4);
}

/* Surah index RTL enhancement */
#quran-pro-surah-list .text-right {
  text-align: right;
  direction: rtl;
}

#quran-pro-surah-list .quran-pro-surah-btn {
  direction: rtl;
  text-align: right;
  padding: 1rem;
  border-radius: 1rem;
  transition: all 0.3s ease;
  border: 2px solid #d1fae5;
  background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
}

#quran-pro-surah-list .quran-pro-surah-btn:hover {
  border-color: #10b981;
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.15);
  transform: translateY(-2px);
}

#quran-pro-surah-list .quran-pro-surah-btn.bg-gradient-to-r.from-emerald-600 {
  background: linear-gradient(135deg, #059669, #047857) !important;
  color: white !important;
  border-color: #059669 !important;
  box-shadow: 0 8px 25px rgba(5, 150, 105, 0.3) !important;
}

/* RTL enhancements for verse numbers */
.verse-number-container {
  direction: rtl;
  text-align: center;
}

/* Enhanced verse number styling */
.verse-number-container .text-2xl {
  font-size: 1.5rem !important;
  font-weight: 700;
  color: #059669;
  text-shadow: 0 2px 4px rgba(5, 150, 105, 0.1);
}

/* Improved pagination buttons */
.pagination-btn {
  padding: 0.75rem 1.5rem;
  border-radius: 2rem;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 2px solid #d1fae5;
  background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
}

.pagination-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border-color: #10b981;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

/* Enhanced search input */
#quran-pro-search {
  direction: rtl;
  text-align: right;
}

/* Loading state improvements */
@keyframes shimmer {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

.loading-shimmer {
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* Responsive improvements - juz list only */
@media (max-width: 768px) {
  #quran-pro-juz-list {
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
  }
}
