/**
 * Give Forms Archive Page Styles
 * Grid layout for donation campaigns
 *
 * @format
 */

/* Archive Wrapper */
.give-archive-wrapper {
  background: #f8f9fa;
  min-height: 100vh;
  padding: 60px 0;
}

.give-archive-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Archive Header */
.give-archive-header {
  text-align: center;
  margin-bottom: 60px;
}

.give-archive-title {
  font-size: 48px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 20px 0;
  line-height: 1.2;
}

.give-archive-description {
  font-size: 18px;
  line-height: 1.6;
  color: #666;
  max-width: 800px;
  margin: 0 auto;
}

/* Give Forms Grid */
.give-forms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
  margin-bottom: 60px;
}

/* Form Card */
.give-form-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #70023d;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  position: relative;
}

.give-form-card:hover {
  transform: translateY(-8px);
  border-color: #70023d;
  box-shadow: 0 8px 30px rgba(112, 2, 61, 0.25);
}

/* Card Image */
.give-form-card-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #f5f5f5;
  isolation: isolate;
}

.give-form-image-link {
  display: block;
  width: 100%;
  height: 100%;
}

.give-form-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.give-form-card:hover .give-form-thumbnail {
  transform: scale(1.05);
}

/* Placeholder Image */
.give-form-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  color: #ccc;
}

/* Status Badge (Top Right) */
.give-form-status-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: #70023d;
  color: #fff;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(112, 2, 61, 0.3);
  z-index: 2;
}

.give-form-status-badge.enabled {
  background: #70023d;
}

/* Price Badge (Circular) */
.give-form-price-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background: #70023d;
  color: #fff;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px;
  box-shadow: 0 4px 12px rgba(112, 2, 61, 0.3);
  z-index: 2;
}

.give-form-price-badge .price-text {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  text-transform: uppercase;
}

/* Category Badge */
.give-form-category-badge {
  position: absolute;
  bottom: 5px;
  left: 5px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  z-index: 3;
}

.give-category-label {
  background: #70023d;
  color: #fff;
  padding: 10px 20px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(112, 2, 61, 0.4);
  display: inline-block;
  text-decoration: none;
  transition: all 0.3s ease;
}

.give-category-label:hover {
  background: #8b0349;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(112, 2, 61, 0.5);
}

/* Card Content */
.give-form-card-content {
  padding: 25px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* Goal Reached Badge */
.give-goal-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #70023d;
  color: #fff;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 15px;
  align-self: flex-start;
}

/* Card Title */
.give-form-card-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 15px 0;
  color: #1a1a1a;
}

.give-form-card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

.give-form-card-title a:hover {
  color: #70023d;
}

/* Card Excerpt */
.give-form-card-excerpt {
  font-size: 15px;
  line-height: 1.6;
  color: #666;
  margin-bottom: 20px;
  flex-grow: 1;
}

/* Card Button */
.give-form-card-button {
  display: block;
  width: 100%;
  padding: 15px 25px;
  background: linear-gradient(135deg, #70023d 0%, #8b0349 100%);
  color: #fff;
  text-align: center;
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(112, 2, 61, 0.3);
  margin-bottom: 20px;
}

.give-form-card-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(112, 2, 61, 0.4);
}

/* Card Progress */
.give-form-card-progress {
  margin-top: auto;
  padding: 0 20px 20px 20px;
  border-radius: 0 0 12px 12px;
  margin: 0 -25px -25px -25px;
}

.give-form-card-progress {
  position: relative;
}

.give-form-progress-bar {
  height: 12px;
  background: #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 15px;
  margin-top: 20px;
  position: relative;
}

.give-form-progress-percentage-label {
  position: absolute;
  left: 0;
  top: 0;
  font-size: 16px;
  font-weight: 700;
  color: #70023d;
  line-height: 1;
  transition: left 0.3s ease;
  z-index: 2;
  transform: translateX(-50%);
  white-space: nowrap;
}

.give-form-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #70023d 0%, #8b0349 100%);
  border-radius: 10px;
  transition: width 1s ease;
  position: absolute;
  top: 0;
  left: 0;
  max-width: 100%;
}

/* Card Stats */
.give-form-card-stats {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.give-form-stat-raised,
.give-form-stat-goal {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.give-form-stat-raised strong,
.give-form-stat-goal strong {
  font-size: 20px;
  color: #1a1a1a;
  font-weight: 700;
  display: block;
}

.give-form-stat-raised span,
.give-form-stat-goal span {
  font-size: 11px;
  color: #666;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* No Forms Found */
.give-no-forms {
  text-align: center;
  padding: 80px 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.give-no-forms-content svg {
  color: #ccc;
  margin-bottom: 20px;
}

.give-no-forms-content h3 {
  font-size: 28px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 15px 0;
}

.give-no-forms-content p {
  font-size: 16px;
  color: #666;
  margin: 0;
}

/* Pagination */
.give-archive-pagination {
  margin-top: 60px;
  text-align: center;
}

.give-archive-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.give-archive-pagination .page-numbers li {
  display: inline-block;
}

.give-archive-pagination a.page-numbers,
.give-archive-pagination span.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 45px;
  height: 45px;
  padding: 0 15px;
  background: #fff;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  color: #333;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s ease;
}

.give-archive-pagination a.page-numbers:hover {
  background: #70023d;
  border-color: #70023d;
  color: #fff;
  transform: translateY(-2px);
}

.give-archive-pagination span.current {
  background: #70023d;
  border-color: #70023d;
  color: #fff;
}

.give-archive-pagination .prev,
.give-archive-pagination .next {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.give-archive-pagination .prev svg,
.give-archive-pagination .next svg {
  width: 12px;
  height: 12px;
}

.give-archive-pagination .dots {
  pointer-events: none;
  border: none;
  background: transparent;
  color: #999;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .give-forms-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
  }

  .give-archive-title {
    font-size: 40px;
  }
}

@media (max-width: 992px) {
  .give-archive-wrapper {
    padding: 40px 0;
  }

  .give-archive-header {
    margin-bottom: 40px;
  }

  .give-archive-title {
    font-size: 36px;
  }

  .give-forms-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
  }

  .give-form-card-content {
    padding: 20px;
  }

  .give-form-card-title {
    font-size: 20px;
  }
}

@media (max-width: 768px) {
  .give-archive-wrapper {
    padding: 30px 0;
  }

  .give-archive-header {
    margin-bottom: 30px;
  }

  .give-archive-title {
    font-size: 30px;
  }

  .give-archive-description {
    font-size: 16px;
  }

  .give-forms-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .give-form-price-badge {
    width: 70px;
    height: 70px;
  }

  .give-form-price-badge .price-text {
    font-size: 10px;
  }

  .give-form-stat-amounts {
    flex-direction: column;
    gap: 8px;
  }

  .give-archive-pagination a.page-numbers,
  .give-archive-pagination span.page-numbers {
    min-width: 40px;
    height: 40px;
    font-size: 14px;
  }
}

@media (max-width: 576px) {
  .give-archive-container {
    padding: 0 15px;
  }

  .give-archive-title {
    font-size: 26px;
  }

  .give-form-status-badge {
    padding: 6px 15px;
    font-size: 11px;
  }

  .give-form-price-badge {
    width: 60px;
    height: 60px;
    top: 10px;
    left: 10px;
  }

  .give-form-price-badge .price-text {
    font-size: 9px;
  }

  .give-form-category-badge {
    bottom: 25px;
    left: 10px;
    height: 10px;
  }

  .give-category-label {
    padding: 6px 15px;
    font-size: 11px;
  }

  .give-form-card-button {
    padding: 12px 20px;
    font-size: 14px;
  }

  .give-form-stat-percentage {
    font-size: 20px;
  }

  .give-archive-pagination .prev,
  .give-archive-pagination .next {
    font-size: 0;
  }

  .give-archive-pagination .prev svg,
  .give-archive-pagination .next svg {
    width: 16px;
    height: 16px;
  }
}

/* Loading Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.give-form-card {
  animation: fadeInUp 0.6s ease-out;
  animation-fill-mode: both;
}

/* Stagger animation for cards */
.give-form-card:nth-child(1) {
  animation-delay: 0.1s;
}
.give-form-card:nth-child(2) {
  animation-delay: 0.2s;
}
.give-form-card:nth-child(3) {
  animation-delay: 0.3s;
}
.give-form-card:nth-child(4) {
  animation-delay: 0.4s;
}
.give-form-card:nth-child(5) {
  animation-delay: 0.5s;
}
.give-form-card:nth-child(6) {
  animation-delay: 0.6s;
}

/* Print Styles */
@media print {
  .give-archive-wrapper {
    background: #fff;
  }

  .give-form-card {
    box-shadow: none;
    border: 1px solid #ccc;
    page-break-inside: avoid;
  }

  .give-archive-pagination {
    display: none;
  }
}
