/* =========================================================
   RASHIFAL MODULE (Sidebar)
   - Style 4: Expanding Card Tabs
   - Active tab: cream/yellow bg, black icon, shows label
   - Inactive tab: transparent/light bg, dark icon, icon only
   ========================================================= */

/* Section */
.rashifal-section {
  background: white;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 4px 20px rgba(51, 0, 5, 0.08);
  margin: 0 auto;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.rashifal-header {
  margin-bottom: 14px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.rashifal-title {
  font-size: 1.2rem;
  font-family: "Rastaglion", "Times New Roman", serif;
  font-weight: 600;
  color: #330005;
}

/* Date tabs */
.rashifal-date-tabs {
  display: inline-flex;
  gap: 4px;
  background: #fff;
  padding: 4px;
  border-radius: 25px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.08);
}

.rashifal-date-tab {
  padding: 8px 14px;
  border: none;
  background: transparent;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.82rem;
  color: #666;
  transition: all 0.3s ease;
  font-weight: 500;
}

.rashifal-date-tab:hover {
  background: rgba(51, 0, 5, 0.05);
}

.rashifal-date-tab.active {
  background: #330005;
  color: #fff;
  box-shadow: 0 2px 8px rgba(51, 0, 5, 0.3);
}

/* Dropdown */
.rashifal-select-wrapper {
  margin-bottom: 14px;
}

.rashifal-select {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid rgba(51, 0, 5, 0.15);
  border-radius: 10px;
  background: #fff;
  font-size: 1.1rem;
  color: #330005;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23330005' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 18px;
}

/* Detail card */
.rashifal-detail {
  border-radius: 14px;
  padding: 16px;
}

.rashifal-detail-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(51, 0, 5, 0.08);
}

.rashifal-detail-icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f5e6ff 0%, #e8d4f5 100%);
  border-radius: 12px;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.rashifal-detail-info h4 {
  margin: 0 0 2px 0;
  font-size: 1.1rem;
  color: #330005;
  font-weight: 600;
}

.rashifal-detail-info span {
  color: #888;
  font-size: 0.8rem;
}

/* =========================================================
   CATEGORY TABS - Style 4: Expanding Card (Instagram-like)
   - Inactive: icon only, dark icon, transparent bg
   - Active: expands with cream bg, black icon, shows label
   ========================================================= */

.rashifal-category-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 0px;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 0;
  padding-bottom:0;
}

/* Hide scrollbar but keep functionality */
.rashifal-category-tabs::-webkit-scrollbar {
  display: none;
}

.rashifal-category-tabs {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Base tab - icon only state */
.rashifal-category-tab {
  flex: 0 0 auto;
  min-width: 48px;
  height: 48px;
  background: transparent;
  border: none;
  border-radius: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  position: relative;
}

/* Icon styling */
.rashifal-category-tab .category-icon {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
  transition: transform 0.3s ease, color 0.3s ease;
  color: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Label - hidden by default */
.rashifal-category-tab .category-label {
  font-size: 13px;
  font-weight: 600;
  color: #b8860b;
  white-space: nowrap;
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover state for inactive tabs */
.rashifal-category-tab:hover:not(.active) {
  background: rgba(0, 0, 0, 0.05);
}

.rashifal-category-tab:hover:not(.active) .category-icon {
  transform: scale(1.1);
}

/* =========================================================
   ACTIVE STATE - Expanded with cream background
   ========================================================= */

.rashifal-category-tab.active {
  min-width: auto;
  padding: 0 20px;
  background: #f0e9de;
  /*box-shadow: 0 2px 12px rgba(184, 134, 11, 0.15);*/
}

/* Active icon - stays black */
.rashifal-category-tab.active .category-icon {
  color: #1a1a1a;
  transform: scale(1.05);
}

/* Active label - visible with animation */
.rashifal-category-tab.active .category-label {
  max-width: 100px;
  opacity: 1;
  margin-left: 2px;
  color: #330005;
  animation: labelSlideIn 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes labelSlideIn {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Focus state for accessibility */
.rashifal-category-tab:focus-visible {
  outline: 2px solid #b8860b;
  outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .rashifal-category-tab,
  .rashifal-category-tab .category-icon,
  .rashifal-category-tab .category-label {
    transition: none !important;
  }
  
  .rashifal-category-tab.active .category-label {
    animation: none !important;
  }
}

/* =========================================================
   PREDICTION TEXT
   ========================================================= */

.rashifal-prediction {
  font-size: 14px;
  line-height: 1.7;
  color: #4a3728;
  background: #f0e9de;
  padding: 16px;
  border-radius: 12px;
  min-height: 80px;
  margin-top:0;
}

/* =========================================================
   MOBILE RESPONSIVE
   ========================================================= */

@media (max-width: 480px) {
  .rashifal-section {
    padding: 14px;
    border-radius: 14px;
  }
  
  .rashifal-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .rashifal-title {
    font-size: 1.1rem;
  }
  
  .rashifal-date-tabs {
    width: 100%;
    justify-content: space-between;
  }
  
  .rashifal-date-tab {
    padding: 6px 10px;
    font-size: 0.75rem;
    flex: 1;
    text-align: center;
  }
  
  .rashifal-category-tabs {
    gap: 6px;
    justify-content: flex-start;
  }
  
  .rashifal-category-tab {
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
  }
  
  .rashifal-category-tab .category-icon {
    font-size: 20px;
  }
  
  .rashifal-category-tab.active {
    padding: 0 16px;
  }
  
  .rashifal-category-tab .category-label {
    font-size: 12px;
  }
  
  .rashifal-prediction {
    padding: 14px;
    font-size: 13px;
  }
}

@media (max-width: 360px) {
  .rashifal-category-tab {
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
  }
  
  .rashifal-category-tab .category-icon {
    font-size: 18px;
  }
  
  .rashifal-category-tab.active {
    padding: 0 14px;
  }
  
  .rashifal-category-tab .category-label {
    font-size: 11px;
  }
}

.rashi-icon-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}
.rashifal-detail-icon{
  background: #f0e9de;
}
