/* Import Inter font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap');

/* Styles for Enrollware feed with card layout */
.enrollware-feed-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* Card styles (using Tailwind classes via CDN in plugin) */
.card {
  background-color: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 0.5rem; /* Reduced padding to help halve height */
  padding-bottom: 28px; /* Increased to ensure Seats Left is visible */
  margin-bottom: 0.5rem; /* Reduced margin */
  max-width: 609px;
  width: 100%;
  position: relative; /* Contain the absolutely positioned button */
  font-family: 'Inter', sans-serif; /* Apply Inter font */
}

/* Adjust text sizes and spacing */
.card p {
  margin: 0; /* Remove default <p> margins */
  line-height: 1.5; /* Adjust line height for 16px font */
  font-size: 16px; /* Set to 16px */
  font-family: 'Inter', sans-serif;
}

.card p.text-lg {
  font-size: 16px; /* Override to 16px */
  margin-bottom: 0.25rem; /* 4px spacing between elements */
}

.card p.text-gray-600 {
  font-size: 16px; /* Override to 16px */
  margin-bottom: 0.25rem; /* 4px spacing between elements */
}

.card p.seats-left {
  display: block; /* Ensure it displays */
  font-size: 16px; /* Override to 16px */
  margin-bottom: 0.25rem;
}

/* Show Book Now button on hover */
.card:hover .book-now-btn {
  display: inline-block !important; /* Increase specificity */
}

.button-wrapper {
  position: absolute;
  bottom: 8px; /* Align with the reserved padding */
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
}

.book-now-btn {
  display: none; /* Hidden by default */
  background-color: #EAECF0;
  color: #30437E; /* Darker text for readability on light background */
  font-weight: 500;
  padding: 0.25rem 1rem; /* Reduced padding to shrink height */
  border-radius: 0.25rem;
  text-decoration: none;
  margin-top: 0.25rem; /* Reduced margin */
  width: 150px; /* Fixed width to match pagination buttons */
  text-align: center;
  border: 1px solid #30437E; /* Border color */
  font-family: 'Inter', sans-serif;
  font-size: 16px; /* Set to 16px */
}

.book-now-btn:hover {
  background-color: #30437E;
  color: white; /* White text on hover for readability */
}

/* Pagination styles */
.pagination {
  display: flex;
  flex-direction: row; /* Place buttons side by side */
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
  width: 100%;
}

.pagination-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #EAECF0;
  color: #30437E; /* Darker text for readability */
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  border: 1px solid #30437E; /* Border color */
  cursor: pointer;
  width: calc(50% - 0.75rem); /* Half of (card width - padding) minus half the gap */
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-size: 16px; /* Set to 16px */
  gap: 8px; /* Space between text and icon */
}

.pagination-btn:hover:not(:disabled) {
  background-color: #30437E;
  color: white; /* White text on hover */
}

.pagination-btn:hover:not(:disabled) .icon-prev svg,
.pagination-btn:hover:not(:disabled) .icon-next svg {
  stroke: white; /* Change icon color on hover */
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.icon-prev,
.icon-next {
  display: inline-flex;
  align-items: center;
}

.icon-prev svg,
.icon-next svg {
  width: 16px;
  height: 16px;
}

/* Mobile view adjustments */
@media (max-width: 768px) {
  .book-now-btn {
    display: inline-block !important; /* Always visible on mobile */
    width: 150px !important; /* Reduced width for mobile */
    padding: 0.25rem 0.25rem; /* Further reduce padding to fit text */
    white-space: nowrap; /* Prevent text from splitting */
  }

  .card {
    padding-bottom: 36px; /* Ensure enough space with increased button height */
  }

  .button-wrapper {
    bottom: 8px; /* Adjust positioning to prevent overlap */
  }

  .pagination-btn {
    width: calc(50% - 0.75rem); /* Adjust for mobile */
  }
}