/**
 * Sehri Connect - Premium Ramadan Experience
 * Inspired by Al-Quran app (Cream/Brown/Gold Aesthetic)
 * Mobile-First, Fully Responsive.
 */
/* Fonts are now loaded in index.php via link tags for better performance */

:root {
  /* Al-Quran Image Palette */
  --bg-app: #fcf8f2;
  --bg-card: #ffffff;
  --bg-secondary: #f5ece2;
  --primary-brown: #8b6e58;
  --primary-brown-light: #a68d7b;
  --primary-brown-extra-light: #ebe0d5;
  /* Legacy Compatibility Bridge */
  --color-white: #ffffff;
  --color-offwhite: var(--bg-app);
  --color-cream: var(--bg-secondary);
  --color-gold: var(--accent-gold);
  --color-gold-light: var(--primary-brown-extra-light);
  --color-gold-dark: var(--primary-brown);
  --color-gold-glow: rgba(139, 110, 88, 0.1);
  --color-emerald: #004b23;
  --color-charcoal: var(--text-main);
  --color-gray: var(--text-muted);
  --color-gray-light: #a0a0a0;
  --color-border: rgba(139, 110, 88, 0.1);
  --color-error: #c62828;
  --font-body: "Plus Jakarta Sans", sans-serif;
  --font-heading: "Amiri", serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;
  --shadow-md: var(--shadow-md);
  --shadow-lg: var(--shadow-lg);
  --transition-base: var(--transition);
  --header-height: 70px;
  --bottom-nav-height: 80px;
  /* Glassmorphism Tokens */
  --glass-bg: rgba(255, 255, 255, 0.6);
  --glass-border: rgba(255, 255, 255, 0.4);
  --glass-blur: blur(12px);
  --glass-shadow: 0 8px 32px 0 rgba(139, 110, 88, 0.1);
  --max-width: 500px;
  --accent-gold: #c5a059;
  --transition: all 0.3s ease;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(139, 110, 88, 0.1);
  --shadow-lg: 0 10px 25px rgba(139, 110, 88, 0.15);
  --radius-full: 9999px;
  --text-main: #2d241e;
  --text-muted: #8a7a6f;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: "Plus Jakarta Sans", sans-serif;
  background-color: #f0e6dd; /* Soft cream-gray backdrop */
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}

.app-container {
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: 100vh;
  background-color: var(--bg-app);
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  /* Fixed Frame Removed from here, moved to overlay */
}

/* Decorative Fixed Frame */
/* Decorative Fixed Frame */
.frame-overlay {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-width);
  height: 100vh; /* Full viewport height */
  pointer-events: none;
  z-index: 9999;
  border: 5px groove var(--accent-gold); /* Premium Double Line Border */
  border-radius: 0; 
  box-shadow: inset 0 0 20px rgba(184, 134, 11, 0.1);
}

/* Scrolling Marquee */
.marquee-container {
  background: var(--bg-secondary);
  color: var(--primary-brown);
  padding: 10px 0;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  border-top: 1px solid var(--primary-brown-extra-light);
  font-size: 0.85rem;
  font-weight: 600;
  will-change: transform;
}

.marquee-content {
  display: inline-block;
  animation: marquee 20s linear infinite;
  padding-left: 100%;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* Decorative Ramadan Background */
.app-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    radial-gradient(
      circle at 50% 0%,
      rgba(255, 215, 0, 0.08) 0%,
      transparent 70%
    );
  background-attachment: fixed;
  pointer-events: none;
  z-index: 0;
  animation: bg-pulse 10s infinite alternate ease-in-out;
}

@keyframes bg-pulse {
  0% {
    background-color: #fcf8f2;
  }
  100% {
    background-color: #fffdf9;
  }
}

/* Floating Lanterns */
.lantern {
  position: absolute;
  top: -15px;
  width: 80px;
  height: 120px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23C5A059'%3E%3Cpath d='M12 2L9 4V7H15V4L12 2M8 8V18L12 21L16 18V8H8M12 10A2 2 0 0 1 14 12A2 2 0 0 1 12 14A2 2 0 0 1 10 12A2 2 0 0 1 12 10Z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  transform-origin: top center;
  animation: swing 4s ease-in-out infinite;
  z-index: 5;
  filter: drop-shadow(0 0 15px rgba(197, 160, 89, 0.4));
  opacity: 0.9;
  will-change: transform, filter;
}

.lantern-left {
  left: 10px;
}
.lantern-right {
  right: 10px;
  animation-delay: -2s;
}

@keyframes swing {
  0% {
    transform: rotate(-5deg);
    filter: drop-shadow(0 0 15px rgba(139, 110, 88, 0.4));
  }
  50% {
    transform: rotate(5deg);
    filter: drop-shadow(0 0 25px rgba(255, 215, 0, 0.6));
  }
  100% {
    transform: rotate(-5deg);
    filter: drop-shadow(0 0 15px rgba(139, 110, 88, 0.4));
  }
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.3;
    transform: scale(1) rotate(0deg);
    filter: drop-shadow(0 0 2px var(--accent-gold));
  }
  50% {
    opacity: 1;
    transform: scale(1.3) rotate(15deg);
    filter: drop-shadow(0 0 12px #ffd700);
  }
}

.gold-dust {
  position: absolute;
  top: -100px;
  left: 0;
  width: 100%;
  height: 200%;
  background: radial-gradient(circle, #ffd700 1px, transparent 1px);
  background-size: 40px 40px;
  animation: gold-fall 20s linear infinite;
  opacity: 0.15;
  pointer-events: none;
  z-index: 1;
  will-change: transform;
}

@keyframes gold-fall {
  0% {
    transform: translateY(-20%);
    opacity: 0;
  }
  20% {
    opacity: 0.15;
  }
  80% {
    opacity: 0.15;
  }
  100% {
    transform: translateY(100%);
    opacity: 0;
  }
}

.star-shower {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.falling-star {
  position: absolute;
  background: var(--accent-gold);
  clip-path: polygon(
    50% 0%,
    61% 35%,
    98% 35%,
    68% 57%,
    79% 91%,
    50% 70%,
    21% 91%,
    32% 57%,
    2% 35%,
    39% 35%
  );
  filter: drop-shadow(0 0 5px #ffd700);
  opacity: 0;
  animation: star-fall linear infinite;
}

@keyframes star-fall {
  0% {
    transform: translateY(-10vh) rotate(0deg) scale(0.5);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  90% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(110vh) rotate(360deg) scale(1);
    opacity: 0;
  }
}

.star {
  position: absolute;
  background: linear-gradient(135deg, #ffd700, #b8860b);
  clip-path: polygon(
    50% 0%,
    61% 35%,
    98% 35%,
    68% 57%,
    79% 91%,
    50% 70%,
    21% 91%,
    32% 57%,
    2% 35%,
    39% 35%
  );
  animation: twinkle 3s infinite ease-in-out;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* Typography */
h1,
h2,
h3,
h4 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.arabic {
  font-family: "Amiri", serif;
  font-size: 1.5rem;
}

/* Header inspired by image */
.app-header {
  height: auto;
  /* min-height: removed to fit content naturally */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: -5px;
  padding: 24px 12px 12px 12px; /* Increased top padding for frame clearance */
  background: var(--bg-app); /* Solid background for sticky effect */
  z-index: 100;
  margin-top: -15px;
  position: relative; /* Stays at top flex flow */
  box-shadow: 0 4px 24px rgba(139, 110, 88, 0.08); /* Soft shadow over scrolling content */
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: -15px;
  width: 100%;
  max-width: 100%;
}

.header-text-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  flex: 1;
  min-width: 0; /* Allow shrinking */
}

.logo-container {
  width: 65px;
  height: 65px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

.logo-container:hover {
  transform: scale(1.05);
}

.brand-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* border-radius: 50%; */
}

.header-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-brown);
  font-size: 1.25rem;
  border-radius: var(--radius-md);
  border: 1.5px solid #ffffff;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  margin-top: 2px;
  margin-left: -22px;
}

.header-btn:active {
  background: var(--bg-secondary);
}

.header-title {
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0;
  font-family: "Amiri", serif;
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

/* Bottom Nav inspired by image */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-width);
  height: 85px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 10px 15px 10px;
  border-top: 1px solid rgba(139, 110, 88, 0.1);
  box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.03);
  z-index: 1000;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.nav-icon-wrapper {
  width: 44px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item i {
  font-size: 1.3rem;
}

.nav-item .label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.nav-item.active {
  color: var(--primary-brown);
}

.nav-item.active .nav-icon-wrapper {
  background: var(--bg-secondary);
  color: var(--primary-brown);
}

/* Featured Section (Last Read style) */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px 12px 12px;
}

.section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
}

.featured-carousel {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 0 12px 20px 12px;
  scrollbar-width: none;
}

.featured-carousel::-webkit-scrollbar {
  display: none;
}

.featured-card {
  min-width: 160px;
  background: var(--bg-card);
  padding: 18px;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1px solid var(--primary-brown-extra-light);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.featured-card:active {
  transform: scale(0.96);
}

.featured-card-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
}

.featured-card-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Segmented Control (Tabs) */
.segmented-control {
  background: rgba(139, 110, 88, 0.8);
  margin: 0 12px 20px 12px;
  padding: 4px;
  border-radius: var(--radius-md);
  display: flex;
  gap: 2px;
  border: none;
  box-shadow: var(--glass-shadow);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.segment-btn {
  flex: 1;
  border: none;
  background: transparent;
  color: #ebe0d5;
  padding: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.segment-btn.active {
  background: var(--bg-secondary);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

/* Search Bar (Location Selector styled as search) */
.search-wrapper {
  margin: 0 12px 24px 12px;
  position: relative;
  z-index: 10;
}

.search-bar {
  width: 100%;
  background: var(--bg-card);
  border: 1.5px solid var(--primary-brown-extra-light);
  padding: 14px 20px 14px 50px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-main);
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%238B6E58'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='C19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 20px center;
  background-size: 18px;
}

.search-bar:focus {
  outline: none;
  box-shadow:
    0 0 0 2px rgba(212, 175, 55, 0.4),
    0 0 15px rgba(212, 175, 55, 0.2);
  background: #ffffff;
}

.search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary-brown);
  font-size: 1.1rem;
  pointer-events: none;
  z-index: 2;
}

/* Skeleton Loader */
.skeleton-list {
  padding: 0 12px;
}
.skeleton-item {
  height: 90px;
  background: var(--bg-secondary);
  margin-bottom: 14px;
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}
.skeleton-item::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.4) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

/* Provider List Items */
.provider-list {
  padding: 0 0 40px 0;
  display: flex;
  flex-direction: column;
}

.shimmer {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  background-size: 200% 100%;
  animation: shimmer 3s infinite;
}

.gold-shimmer {
  color: #b8860b;
  background: linear-gradient(
    to right,
    #bf953f,
    #fcf6ba,
    #b38728,
    #fbf5b7,
    #aa771c
  );
  background-size: 200% auto;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shine 5s linear infinite;
  font-weight: 800;
  filter: drop-shadow(0 0 2px rgba(255, 215, 0, 0.3));
  display: inline-block;
  position: relative;
  opacity: 1 !important;
  visibility: visible !important;
}

.gold-shimmer::after {
  content: none; /* Removing the extra sweep as it over-glows on light backgrounds */
}

@keyframes sweep {
  0% {
    transform: translateX(-100%) skewX(-15deg);
  }
  100% {
    transform: translateX(200%) skewX(-15deg);
  }
}

@keyframes shine {
  to {
    background-position: 200% center;
  }
}

.provider-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  margin: 0 12px 14px 12px;
  background: #ffffff !important;
  border-bottom: 1px solid var(--primary-brown-extra-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  opacity: 1 !important;
  visibility: visible !important;
  position: relative;
  z-index: 10;
}

.provider-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-brown);
}

.provider-item:active {
  transform: scale(0.98);
  background: var(--bg-card);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.provider-number-frame {
  width: 44px;
  height: 44px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.provider-number-frame i {
  position: absolute;
  font-size: 2.8rem;
  color: var(--primary-brown-extra-light);
}

.provider-number {
  position: relative;
  z-index: 1;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary-brown);
}

.provider-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.provider-name-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.provider-list-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
}

.provider-list-arabic {
  font-family: "Amiri", serif;
  font-size: 1.3rem;
  color: var(--primary-brown);
}

.provider-list-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.provider-badge-row {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

/* Glassmorphic Form Controls */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--primary-brown);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--primary-brown-extra-light);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-main);
  transition: var(--transition);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  background: white;
  border-color: var(--primary-brown);
  box-shadow: 0 0 0 4px rgba(139, 110, 88, 0.1);
  transform: translateY(-1px);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%238B6E58'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='C19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px;
}

.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-group .icon {
  position: absolute;
  left: 14px;
  color: var(--primary-brown);
  opacity: 0.6;
  font-size: 1rem;
}

.input-group .form-input {
  padding-left: 42px;
}

/* Toast System */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 400px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 16px 20px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(139, 110, 88, 0.15);
  border: 1px solid rgba(139, 110, 88, 0.1);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  animation: toast-in 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
  transition: all 0.3s ease;
  pointer-events: auto;
}

.toast span {
  font-size: 1.2rem;
}

.toast-success {
  border-left: 5px solid #004b23;
}

.toast-error {
  border-left: 5px solid #ef4444;
  color: #b91c1c;
}

.toast-warning {
  border-left: 5px solid #f59e0b;
}

@keyframes toast-in {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Global Button System */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary-brown);
  color: white;
  box-shadow: 0 4px 15px rgba(139, 110, 88, 0.2);
}

.btn-primary:hover {
  background: #7a5f4b;
  box-shadow: 0 8px 20px rgba(139, 110, 88, 0.3);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  color: var(--primary-brown);
  border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
  background: white;
  transform: translateY(-2px);
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-lg {
  height: 58px;
  font-size: 1rem;
  letter-spacing: 0.5px;
}

.mini-badge {
  font-size: 0.6rem; /* Slightly smaller for better fit */
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-weight: 700;
  letter-spacing: 0.05em;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  white-space: nowrap; /* Prevent splitting into 2 lines */
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.badge-gold {
  background: rgba(245, 236, 226, 0.6);
  color: var(--primary-brown);
}
.badge-brown {
  background: rgba(166, 141, 123, 0.2);
  color: var(--primary-brown);
}
.badge-free {
  background: rgba(0, 75, 35, 0.15);
  color: #004b23;
  border-color: rgba(0, 75, 35, 0.1);
}

/* Gold Glitter Overlay */
.gold-glitter-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(circle, #ffd700 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: 0.1;
  pointer-events: none;
  animation: jitter 5s infinite;
}

@keyframes jitter {
  0%,
  100% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(1px, -1px);
  }
  50% {
    transform: translate(-1px, 1px);
  }
  75% {
    transform: translate(1px, 1px);
  }
}

/* Sehri Timer Banner */
.timer-banner {
  margin: 0 12px 24px 12px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--glass-shadow);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--glass-border);
}

.timer-banner::before {
  content: "";
  position: absolute;
  top: -20px;
  left: -20px;
  width: 100px;
  height: 100px;
  background: radial-gradient(
    circle,
    rgba(197, 160, 89, 0.1) 0%,
    transparent 70%
  );
  z-index: 0;
}

.timer-info {
  position: relative;
  z-index: 1;
}

.timer-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 4px;
}

.timer-countdown {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary-brown);
}

.mosque-illustration {
  width: 100px;
  height: 60px;
  background-image: url("https://cdn-icons-png.flaticon.com/512/3246/3246522.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.8;
}

/* Modal Styling inspired by Image (Quick Tools) */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(74, 58, 46, 0.4);
  backdrop-filter: blur(4px);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translate(-50%, 100%);
  width: 100%;
  max-width: var(--max-width);
  background: rgba(252, 248, 242, 0.85); /* Frosty App BG */
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 24px 0;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
  border-top: 1px solid var(--glass-border);
}

.modal-overlay.active .modal {
  transform: translate(-50%, 0);
}

.modal-header {
  padding: 0 24px 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-close {
  width: 44px;
  height: 44px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.8) !important;
  border-radius: 12px !important;
  color: var(--primary-brown) !important;
  border: 1px solid var(--glass-border) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  margin: 0 !important;
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: capitalize;
}

/* Modal Action Buttons */
.modal-actions {
  display: flex;
  gap: 12px;
  margin: 24px 0;
  width: 100%;
}

.modal-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px; /* Fixed height for perfect alignment */
  padding: 0 12px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  white-space: nowrap; /* Prevent text stacking */
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-btn-primary {
  background: var(--primary-brown);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(139, 110, 88, 0.3);
}

.modal-btn-primary:active {
  transform: translateY(2px);
  box-shadow: 0 2px 6px rgba(139, 110, 88, 0.3);
}

.modal-btn-outline {
  background: transparent;
  color: var(--primary-brown);
  border: 1.5px solid var(--primary-brown);
}

.modal-btn-outline:active {
  background: var(--primary-brown-extra-light);
}

.modal-btn i {
  font-size: 1.1rem;
}

/* Animations */
@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.animate-fade-up {
  animation: slideUp 0.6s ease forwards;
}

/* Responsive fixes */
@media (max-width: 380px) {
  .timer-countdown {
    font-size: 1.8rem;
  }
  .provider-number-frame {
    width: 36px;
    height: 36px;
  }
  .provider-number-frame i {
    font-size: 2.2rem;
  }
}

/* Toggle Switch */
.toggle-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
}

.toggle {
  width: 50px;
  height: 28px;
  background: #ebe0d5;
  border-radius: 14px;
  position: relative;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(139, 110, 88, 0.1);
}

.toggle::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  background: white;
  border-radius: 50%;
  transition: inherit;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.toggle.active {
  background: #004b23;
  border-color: #004b23;
}

.toggle.active::after {
  left: 24px;
}


/* Drawer Menu */
.menu-drawer {
  position: fixed;
  top: 0;
  right: -300px; /* Start hidden */
  width: 280px;
  height: 100%;
  background: var(--bg-app);
  box-shadow: -5px 0 25px rgba(0,0,0,0.1);
  z-index: 10000;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  padding: 30px 20px;
}

.menu-drawer.active {
  right: 0;
}

.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}

.menu-close {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-brown);
  cursor: pointer;
}

.menu-links {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.menu-link {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 20px;
  background: #ffffff;
  border-radius: 16px;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 700;
  border: 1px solid var(--primary-brown-extra-light);
  transition: all 0.2s ease;
}

.menu-link:active {
  transform: scale(0.98);
  background: var(--bg-secondary);
}

.menu-link i {
  width: 20px;
  color: var(--accent-gold);
}

/* PIN Box Styling */
.pin-container {
    display: flex;
    gap: 8px; /* Slightly reduced gap */
    justify-content: space-between;
    margin-top: 8px;
    direction: ltr !important;
}

.pin-box {
    flex: 1; /* Distribute evenly */
    height: 60px; /* Square-ish height relative to width */
    max-width: 80px; /* Prevent being too wide on large screens */
    min-width: 0;
    border: 1.5px solid rgba(139, 110, 88, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.8);
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    color: var(--text-main);
    transition: all 0.2s ease;
    caret-color: var(--primary-brown);
    appearance: none;
    -moz-appearance: textfield;
}

.pin-box:focus {
    outline: none;
    border-color: var(--primary-brown);
    background: #fff;
    box-shadow: 0 4px 12px rgba(139, 110, 88, 0.15);
    transform: translateY(-2px);
}

.pin-box:valid {
    border-color: #D4AF37;
    background: #fff;
}

.pin-box::-webkit-outer-spin-button,
.pin-box::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
