/**
 * Card variants used across the app: dashboard list-cafe-card, directory page
 * directory-card + aside, cafe-detail-card, cafes-search result cards,
 * about-featured-card, admin stat cards. Loaded after app.css.
 */

/* Search-result card (cafes-search.js renders these into the results grid). */
.cafes-search-card {
  display: block;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition: box-shadow 0.15s, transform 0.15s;
  height: 100%;
}
.cafes-search-card:hover {
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
  color: inherit;
  transform: translateY(-2px);
}
.cafes-search-card-image {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #f3f4f6;
  overflow: hidden;
}
.cafes-search-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cafes-search-card-tag {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.18rem 0.55rem;
  font-size: 0.72rem;
  border-radius: 4px;
  color: #fff;
  font-weight: 600;
}
.cafes-search-card-body {
  padding: 0.75rem 0.9rem 0.95rem;
}
.cafes-search-card-name {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}
.cafes-search-card-description {
  color: #6b7280;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cafes-search-card-meta {
  color: #9ca3af;
  font-size: 0.78rem;
}

/* List cafes: image-first card grid (dashboard) */
.list-cafe-card {
  background-color: #fff;
  box-shadow: 0 0.5rem 1rem rgba(0, 21, 36, 0.08);
  height: 100%;
  display: flex;
  flex-direction: column;
  border-radius: 6px;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.list-cafe-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.75rem 1.4rem rgba(0, 21, 36, 0.12);
}
.list-cafe-card .card-image {
  position: relative;
  background-color: #eee;
}
.list-cafe-card .card-image img {
  object-fit: cover;
  width: 100%;
  height: 100%;
}
.list-cafe-tag {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  color: #fff !important;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}
.list-cafe-private-badge {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background-color: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}
.cafe-detail-private-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.6rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background-color: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  vertical-align: middle;
}
.list-cafe-card .card-content {
  flex-grow: 1;
  padding: 1rem 1.1rem 0.75rem;
}
.list-cafe-name {
  font-family: 'Niconne', cursive;
  font-size: 1.6rem;
  line-height: 1.1;
  margin-bottom: 0.4rem;
}
.list-cafe-name a:hover {
  color: var(--walnut) !important;
}
.list-cafe-description {
  color: #4a4a4a;
  font-size: 0.85rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.5rem;
}
.list-cafe-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  font-size: 0.75rem;
  color: #6b7280;
}
.list-cafe-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.list-cafe-card .card-footer {
  border-top: 1px solid rgba(10, 10, 10, 0.08);
  padding: 0;
}
.list-cafe-link {
  font-weight: 600;
  color: var(--walnut) !important;
}
.list-cafe-link:hover {
  background-color: rgba(109, 61, 20, 0.06);
}
.list-cafe-delete {
  padding: 0.45rem;
}

/* Cafes directory page cards + aside */
.directory-card {
  background-color: #fff;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0.5rem 1rem rgba(0, 21, 36, 0.08);
  border-radius: 6px;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.directory-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.75rem 1.4rem rgba(0, 21, 36, 0.12);
}
.directory-card-image {
  position: relative;
  background-color: #eee;
}
.directory-card-image img {
  object-fit: cover;
  width: 100%;
  height: 100%;
}
.directory-card .card-content {
  flex-grow: 1;
  padding: 1rem 1.1rem;
}
.directory-card-tag {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.65rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}
.directory-card-views {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background-color: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}
.directory-card-name {
  font-family: 'Niconne', cursive;
  font-size: 1.6rem;
  line-height: 1.1;
  margin-bottom: 0.4rem;
}
.directory-card-name a:hover {
  color: var(--walnut) !important;
}
.directory-card-description {
  color: #4a4a4a;
  font-size: 0.85rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.5rem;
}
.directory-card-meta {
  font-size: 0.75rem;
  color: #6b7280;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.directory-card-footer {
  border-top: 1px solid rgba(10, 10, 10, 0.08);
}
.directory-card-link {
  font-weight: 600;
  color: var(--walnut);
}
.directory-card-link:hover {
  background-color: rgba(109, 61, 20, 0.06);
}
.directory-card-delete {
  padding: 0.5rem;
}

/* Aside on the cafes directory page */
.cafes-aside-box {
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 21, 36, 0.06);
}
.cafes-aside-box .heading {
  color: #6b7280;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.7rem;
  margin-bottom: 0.5rem;
}
.cafes-aside-stat {
  font-family: 'Niconne', cursive;
  font-size: 2.6rem;
  line-height: 1;
  color: var(--ink-black);
}
.cafes-aside-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.cafes-aside-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.25rem;
  border-radius: 4px;
  color: var(--ink-black);
  text-decoration: none;
  transition: background-color 0.15s ease;
}
.cafes-aside-row:hover {
  background-color: rgba(0, 21, 36, 0.05);
}
.cafes-aside-row.is-active {
  background-color: rgba(109, 61, 20, 0.10);
  color: var(--walnut);
  font-weight: 600;
}
.cafes-aside-swatch {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 999px;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}
.cafes-aside-name {
  flex-grow: 1;
  font-size: 0.9rem;
}
.cafes-aside-count {
  color: #6b7280;
  font-size: 0.8rem;
  font-weight: 600;
}
.cafes-aside-cta {
  background: linear-gradient(135deg, #fff 0%, var(--light-cyan) 130%);
}

/* Cafe detail page hero card */
.cafe-detail-card {
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 0.75rem 1.5rem rgba(0, 21, 36, 0.10);
}
.cafe-detail-image {
  position: relative;
  background-color: #eee;
}
.cafe-detail-image img {
  object-fit: cover;
  width: 100%;
  height: 100%;
}
.cafe-detail-tag {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.75rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
/* Layout flex/wrap comes from Bulma utility classes on the elements; CSS keeps only gap + colours. */
.cafe-detail-head {
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.cafe-detail-name {
  margin-bottom: 0 !important;
}
.cafe-detail-views,
.cafe-detail-shares {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: #6b7280;
  font-size: 0.85rem;
}
.cafe-detail-meta {
  gap: 0.75rem;
}
.cafe-detail-share-btn {
  font-size: 0.8rem;
}
.share-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(0.5rem);
  background: rgba(33, 33, 33, 0.9);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 50;
}
.share-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.cafe-detail-description p {
  font-size: 1.02rem;
  color: #2a2a2a;
}
.cafe-detail-coords {
  font-size: 0.85rem;
  color: #6b7280;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

/* Cafe card image shine (hover) — applies to every card variant with a card image. */
.list-cafe-card .card-image .image,
.directory-card-image .image,
.cafe-detail-image .image {
  overflow: hidden;
}
.list-cafe-card .card-image .image::after,
.directory-card-image .image::after,
.cafe-detail-image .image::after {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.45) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-20deg);
  pointer-events: none;
  transition: left 0.7s ease;
  z-index: 1;
}
.list-cafe-card:hover .card-image .image::after,
.directory-card:hover .directory-card-image .image::after,
.cafe-detail-card:hover .cafe-detail-image .image::after {
  left: 125%;
}

/* Hover-revealed edit pill in the top-right of any cafe card image. */
.cafe-card-edit-overlay {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink-black);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
  transform: translateY(-4px);
  z-index: 2;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
}
.cafe-card-edit-overlay:hover {
  background: #fff;
  color: var(--espresso);
}
.list-cafe-card:hover .cafe-card-edit-overlay,
.directory-card:hover .cafe-card-edit-overlay,
.cafe-detail-card:hover .cafe-card-edit-overlay {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Favourite heart sits inline next to the cafe title — clear of the category badge over the image. */
.list-cafe-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.cafe-card-fav-inline {
  margin: 0;
  flex-shrink: 0;
}
.cafe-card-fav-btn {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: transparent;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(10, 10, 10, 0.1);
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}
.cafe-card-fav-btn:hover {
  color: #e11d48;
  border-color: #e11d48;
  transform: scale(1.05);
}
.cafe-card-fav-btn.is-favourited {
  color: #e11d48;
  border-color: #e11d48;
}

/* Social grid: reviews left, notices + discussions stacked right on desktop; stacks on mobile. */
.cafe-detail-social .cafe-detail-notice,
.cafe-detail-social .cafe-detail-discussion {
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(10, 10, 10, 0.08);
}
.cafe-detail-social .cafe-detail-notice:last-child,
.cafe-detail-social .cafe-detail-discussion:last-child {
  border-bottom: none;
}
.cafe-detail-social .cafe-detail-notice:first-child,
.cafe-detail-social .cafe-detail-discussion:first-child {
  padding-top: 0;
}

/* Reviews section on cafe detail. */
.cafe-detail-reviews-heading {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.cafe-detail-reviews-count {
  font-weight: 400;
  font-size: 0.85em;
}
.cafe-detail-reviews-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.cafe-detail-review {
  padding: 0.85rem 0;
  border-bottom: 1px solid #eee;
}
.cafe-detail-review:last-child {
  border-bottom: none;
}
.cafe-detail-review-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.8rem;
  margin-bottom: 0.3rem;
}
.cafe-detail-review-stars {
  display: inline-flex;
  gap: 0.1rem;
  color: #ddd;
}
.cafe-detail-review-star.is-filled {
  color: #f5b400;
}
.cafe-detail-review-meta {
  font-size: 0.85rem;
  color: #4a4a4a;
}
.cafe-detail-review-author {
  font-weight: 600;
}
.cafe-detail-review-delete {
  margin-left: auto;
}
.cafe-detail-review-comment {
  margin: 0;
  color: #2a2a2a;
  line-height: 1.4;
  white-space: pre-wrap;
}
.cafe-detail-review-form {
  background-color: #fafafa;
}

/* Admin dashboard stat cards. */
.admin-stats {
  margin-bottom: 1rem;
}
.admin-stat {
  text-align: left;
  border-left: 4px solid var(--walnut);
  padding: 1rem 1.1rem;
}
.admin-stat .heading {
  color: #6b7280;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.admin-stat-value {
  font-family: 'Niconne', cursive;
  font-size: 2.6rem;
  line-height: 1.1;
  color: var(--ink-black);
}

/* About page featured-cafe cards. */
.about-featured-card {
  display: block;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e5e7eb;
  transition: box-shadow 0.15s;
  color: inherit;
  text-decoration: none;
}
.about-featured-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  color: inherit;
}
.about-featured-image {
  aspect-ratio: 3 / 2;
  background: #f3f4f6;
  position: relative;
  overflow: hidden;
}
.about-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.about-featured-body {
  padding: 0.9rem 1rem 1.1rem;
}
.about-featured-body .tag {
  margin-bottom: 0.4rem;
}
.about-featured-body h4 {
  font-weight: 600;
  margin-bottom: 0.2rem;
}
