/**
 * Ecopark Booking Bridge — Engagement Styles (BE-PORT-06..08)
 *
 * Provides styling for Favorite buttons, Share buttons, Recently Viewed sections,
 * and responsive card layouts.
 */

/* ==========================================================================
   1. Favorite Buttons
   ========================================================================== */

.ecopark-card-favorite-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease, box-shadow 0.2s ease;
  color: #4a5568;
}

.ecopark-card-favorite-btn:hover {
  transform: scale(1.08);
  background-color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  color: #e53935;
}

.ecopark-card-favorite-btn:focus-visible {
  outline: 2px solid #0f5132;
  outline-offset: 2px;
}

.ecopark-heart-icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2px;
  transition: fill 0.25s ease, stroke 0.25s ease, transform 0.25s ease;
}

/* Active favorite state */
.ecopark-card-favorite-btn.is-favorite {
  color: #e53935;
  background-color: #ffffff;
}

.ecopark-card-favorite-btn.is-favorite .ecopark-heart-icon {
  fill: #e53935;
  stroke: #e53935;
  transform: scale(1.05);
}

/* Favorite button on Room Detail summary header */
.ecopark-room-favorite-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #d1d5db;
  color: #374151;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ecopark-room-favorite-btn:hover {
  border-color: #e53935;
  color: #e53935;
  background: #fff5f5;
}

.ecopark-room-favorite-btn.is-favorite {
  border-color: #e53935;
  color: #e53935;
  background: #fef2f2;
}

.ecopark-room-favorite-btn.is-favorite .ecopark-heart-icon {
  fill: #e53935;
  stroke: #e53935;
}

/* ==========================================================================
   2. Share Button & Copied Feedback
   ========================================================================== */

.ecopark-room-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #d1d5db;
  color: #374151;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ecopark-room-share-btn:hover {
  border-color: #0f5132;
  color: #0f5132;
  background: #f0fdf4;
}

.ecopark-room-share-btn.is-copied {
  background: #dcfce7 !important;
  color: #166534 !important;
  border-color: #86efac !important;
}

/* ==========================================================================
   3. Recently Viewed & Favorites Sections
   ========================================================================== */

section[data-eco-recently-viewed][hidden],
section[data-eco-favorites-section][hidden] {
  display: none !important;
}

.ecopark-recently-viewed-section,
.ecopark-favorites-section {
  padding: 48px 0;
  background-color: #fafbfc;
  border-top: 1px solid #e5e7eb;
}

.ecopark-section-head-flex {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.ecopark-clear-recent-btn {
  background: none;
  border: none;
  color: #6b7280;
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color 0.2s ease;
}

.ecopark-clear-recent-btn:hover {
  color: #b91c1c;
}

/* Responsive grid for engagement cards */
.ecopark-engagement-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 1024px) {
  .ecopark-engagement-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 640px) {
  .ecopark-engagement-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* Relative container on browse card for absolute heart button */
.ecopark-room-card-browse {
  position: relative;
}
