/* Skeleton Loading Animation */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.skeleton {
  animation: shimmer 2s infinite linear;
  background: linear-gradient(to right, var(--bs-skeleton-primary) 4%, var(--bs-skeleton-secondary) 25%, var(--bs-skeleton-primary) 36%);
  background-size: 1000px 100%;
  border-radius: var(--bs-border-radius);
}

/* Card Skeletons */
.skeleton-card {
  height: 100px;
  background-color: var(--bs-body-bg-secondary);
  border-radius: var(--bs-border-radius);
  border: 1px solid var(--bs-border-color);
  padding: 16px;
  /* box-shadow: 0 1px 4px rgba(0,0,0,0.05); */
}

/* Header Skeletons */
.skeleton-title {
  height: 24px;
  width: 150px;
  margin-bottom: 8px;
}

.skeleton-value {
  height: 32px;
  width: 120px;
}

/* Charges Table Specific Skeletons */
.skeleton-checkbox {
  width: 18px;
  height: 18px;
}

.skeleton-id {
  width: 120px;
  height: 20px;
}

.skeleton-amount {
  width: 80px;
  height: 20px;
}

.skeleton-method {
  width: 48px;
  height: 24px;
  border-radius: var(--bs-border-radius);
}

.skeleton-status {
  width: 90px;
  height: 24px;
  border-radius: var(--bs-border-radius);
}

.skeleton-date {
  width: 120px;
  height: 20px;
}

.skeleton-action {
  width: 28px;
  height: 28px;
  border-radius: var(--bs-border-radius);
}

.skeleton-filter-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.skeleton-filter-button {
  width: 100px;
  height: 28px;
}

.skeleton-pagination-info {
  width: 100px;
  height: 20px;
}

.skeleton-pagination-button {
  width: 26px;
  height: 26px;
  border-radius: var(--bs-border-radius);
}

/* Overview Chart Skeleton */
.skeleton-chart {
  height: 300px;
  margin: 20px 0;
}

/* Payment Methods Skeleton */
.skeleton-payment-method {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}

.skeleton-icon {
  height: 40px;
  width: 40px;
  border-radius: 50%;
  margin-right: 16px;
}

.skeleton-text {
  flex: 1;
}

.skeleton-text-line {
  height: 16px;
  margin-bottom: 8px;
  width: 80%;
}

.skeleton-text-line:last-child {
  width: 60%;
}

/* Transactions List Skeleton */
.skeleton-transaction {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--bs-table-border-color);
}

.skeleton-transaction-id {
  height: 16px;
  width: 120px;
  margin-right: 16px;
}

.skeleton-transaction-amount {
  height: 16px;
  width: 80px;
  margin-right: 16px;
}

.skeleton-transaction-status {
  height: 20px;
  width: 90px;
  border-radius: .5rem;
}

/* Grid Layout */
.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

/* Charges Page Specific Skeletons */
.skeleton-filter {
  background: linear-gradient(to right, #f6f7f8 4%, #edeef1 25%, #f6f7f8 36%);
  background-size: 1000px 100%;
  animation: shimmer 2s infinite linear;
  border-radius: var(--bs-border-radius);
}

.skeleton-table-header {
  height: 20px;
  margin: 8px 0;
}

.skeleton-table-cell {
  height: 20px;
  margin: 8px 0;
  border-radius: 0.25rem;
}

.skeleton-status {
  height: 24px;
  border-radius: var(--bs-border-radius);
}

.skeleton-pagination {
  display: flex;
  gap: 1px;
  align-items: center;
}

.skeleton-page-number {
  width: 35px;
  height: 35px;
  border-radius: var(--bs-border-radius);
}

@media (max-width: 992px) {
  .skeleton-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .skeleton-grid {
    grid-template-columns: 1fr;
  }
}

/* Loading State Class */
.is-loading {
  pointer-events: none;
  opacity: 0.7;
}


/* Thank You Page Specific Skeletons */
.skeleton-thankyou-header {
  height: 32px;
  width: 200px;
  margin: 0 auto 16px;
}

.skeleton-thankyou-subtitle {
  height: 18px;
  width: 300px;
  margin: 0 auto 8px;
}

.skeleton-thankyou-subtitle-short {
  height: 18px;
  width: 250px;
  margin: 0 auto 24px;
}

/* Order Icon Skeleton */
.skeleton-order-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 24px;
}

/* Countdown Timer Skeleton */
.skeleton-timer-container {
  background: var(--bs-body-bg-secondary);
  border-radius: var(--bs-border-radius);
  padding: 16px;
  margin: 16px 0;
  text-align: center;
}

.skeleton-timer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.skeleton-timer-number {
  width: 40px;
  height: 32px;
  border-radius: var(--bs-border-radius);
}

.skeleton-timer-separator {
  width: 8px;
  height: 20px;
  border-radius: var(--bs-border-radius);
}

.skeleton-timer-label {
  height: 16px;
  width: 180px;
  margin: 0 auto;
}

/* Payment Amount Display */
.skeleton-payment-amount {
  height: 36px;
  width: 150px;
  margin: 0 auto 16px;
  border-radius: var(--bs-border-radius);
}

/* QR Code Skeleton */
.skeleton-qr-code {
  width: 200px;
  height: 200px;
  margin: 0 auto 24px;
  border-radius: var(--bs-border-radius);
}

/* Payment Method Badge */
.skeleton-payment-method-badge {
  width: 80px;
  height: 28px;
  border-radius: var(--bs-border-radius);
  margin: 0 auto 16px;
}

/* Instruction Text Lines */
.skeleton-instruction-full {
  height: 16px;
  width: 100%;
  margin-bottom: 8px;
}

.skeleton-instruction-80 {
  height: 16px;
  width: 80%;
  margin-bottom: 8px;
}

.skeleton-instruction-60 {
  height: 16px;
  width: 60%;
  margin-bottom: 16px;
}

/* Action Button Skeleton */
.skeleton-action-button {
  height: 44px;
  width: 200px;
  border-radius: var(--bs-border-radius);
  margin: 0 auto 24px;
}

/* FAQ Section Skeletons */
.skeleton-faq-container {
  margin-top: 32px;
}

.skeleton-faq-title {
  height: 24px;
  width: 120px;
  margin-bottom: 16px;
}

.skeleton-faq-item {
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  margin-bottom: 8px;
  padding: 16px;
}

.skeleton-faq-question {
  height: 18px;
  width: 90%;
  margin-bottom: 8px;
}

.skeleton-faq-answer {
  height: 14px;
  width: 100%;
  margin-bottom: 4px;
}

.skeleton-faq-answer:last-child {
  width: 70%;
}

/* Footer Payment Info */
.skeleton-footer-container {
  background: var(--bs-body-bg-secondary);
  border-radius: var(--bs-border-radius);
  padding: 20px;
  margin-top: 32px;
}

.skeleton-footer-title {
  height: 20px;
  width: 160px;
  margin-bottom: 12px;
}

.skeleton-footer-info {
  height: 16px;
  margin-bottom: 6px;
}

.skeleton-footer-info-full {
  width: 100%;
}

.skeleton-footer-info-80 {
  width: 80%;
}

.skeleton-footer-info-60 {
  width: 60%;
}

/* Order Details Accordion Skeleton */
/* Missing skeleton classes */
.skeleton-accordion-header {
  height: 48px;
  border-radius: var(--bs-border-radius);
  margin-bottom: 16px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bs-body-bg-secondary);
  border: 1px solid var(--bs-border-color);
}

.skeleton-accordion-icon {
  width: 20px;
  height: 20px;
  border-radius: var(--bs-border-radius);
  flex-shrink: 0;
}

.skeleton-accordion-title {
  height: 18px;
  width: 140px;
  flex: 1;
}

/* Product Item Skeletons */
.skeleton-product-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
}

.skeleton-product-image {
  width: 50px;
  height: 50px;
  border-radius: var(--bs-border-radius);
  flex-shrink: 0;
}

.skeleton-product-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.skeleton-product-name {
  height: 16px;
  width: 80%;
}

.skeleton-product-price {
  height: 14px;
  width: 60px;
}

/* Ensure all skeleton elements have the shimmer effect */
.skeleton-timer-container .skeleton,
.skeleton-accordion-header .skeleton,
.skeleton-product-item .skeleton,
.skeleton-faq-item .skeleton,
.skeleton-footer-container .skeleton {
  animation: shimmer 2s infinite linear;
  background: linear-gradient(to right, var(--bs-skeleton-primary) 4%, var(--bs-skeleton-secondary) 25%, var(--bs-skeleton-primary) 36%);
  background-size: 1000px 100%;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .skeleton-qr-code {
    width: 160px;
    height: 160px;
  }
  
  .skeleton-thankyou-header {
    width: 180px;
  }
  
  .skeleton-thankyou-subtitle {
    width: 250px;
  }
  
  .skeleton-timer-number {
    width: 35px;
    height: 28px;
  }
}

/* Smooth Transition for Skeleton Removal */
.skeleton-fade-out {
  opacity: 0;
  transition: opacity 0.3s ease-out;
}

.skeleton-hidden {
  display: none !important;
}


/* Error Page Skeletons */
.skeleton-error-icon {
    width: 68px;
    height: 68px;
    margin: 0 auto;
    border-radius: 50%;
}

.skeleton-error-title {
    height: 38px;
    width: 280px;
    margin: 0 auto;
    border-radius: var(--bs-border-radius);
}

.skeleton-error-description-full {
    height: 20px;
    width: 100%;
    border-radius: var(--bs-border-radius);
}

.skeleton-error-description-80 {
    height: 20px;
    width: 80%;
    border-radius: var(--bs-border-radius);
}

.skeleton-error-description-60 {
    height: 20px;
    width: 60%;
    border-radius: var(--bs-border-radius);
}

/* Ensure error skeleton elements have the shimmer effect */
.skeleton-error-icon,
.skeleton-error-title,
.skeleton-error-description-full,
.skeleton-error-description-80,
.skeleton-error-description-60 {
    animation: shimmer 2s infinite linear;
    background: linear-gradient(to right, var(--bs-skeleton-primary) 4%, var(--bs-skeleton-secondary) 25%, var(--bs-skeleton-primary) 36%);
    background-size: 1000px 100%;
}

/* Responsive adjustments for error skeletons */
@media (max-width: 768px) {
    .skeleton-error-title {
        width: 220px;
    }
    
    .skeleton-error-icon {
        width: 40px;
        height: 40px;
    }
}