/* static/css/recipe-styles.css */

@import url('./colors.css');

/* Bookmark Icon Styles */
.bookmark-icon svg {
  width: 24px;
  height: 24px;
}

.bookmark-icon svg path {
  fill: none;
  stroke: var(--bs-dark);
  stroke-width: 2px;
  stroke-linejoin: round;
  stroke-linecap: round;
}

a.bookmark-icon:hover {
  text-decoration: none;
  cursor: pointer;
}

a.bookmark-icon:hover svg path {
  stroke: var(--bs-orange);
  fill: var(--bs-orange);
}

.bookmark-icon.bookmarked svg path {
  stroke: var(--bs-orange);
  fill: var(--bs-orange);
}

a.bookmark-icon.bookmarked:hover svg path {
  stroke: var(--bs-dark);
  fill: none;
}

.chevron-btn {
  color: var(--bs-black);
  transition: color 0.3s ease;
}

.chevron-btn:hover {
  color: orange;
}

.recipe-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.action-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: none;
  border: none;
  cursor: pointer;
}

.action-icon svg {
  width: 100%;
  height: 100%;
}

/* Recipe Card Styles */
.recipe-card {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.recipe-card:hover {
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  transform: translateY(-5px);
}

.recipe-image-wrapper {
  position: relative;
  width: 100%;
  height: 133px;
  overflow: hidden;
}

.recipe-image-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.recipe-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recipe-details {
  padding: 0.25rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.recipe-header {
  display: flex;
  flex-direction: column;
  margin-bottom: 0.25rem;
  min-height: 3.5rem;
}

.recipe-title {
  font-size: 1rem;
  line-height: 1.2;
  margin: 0 0 0.1rem 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.recipe-source {
  font-size: 0.75rem;
  color: var(--bs-dark);
  margin-bottom: 0.1rem;
}

.recipe-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  margin-top: 0;
}

.recipe-rating,
.recipe-time,
.recipe-ingredients {
  font-size: 0.75rem;
  color: var(--bs-dark);
  margin-bottom: 0.1rem;
}

.star {
  color: #ccc;
  font-size: 0.875em;
}

.star.filled {
  color: #ffd700;
}

.rating-count {
  margin-left: 0.25rem;
}

.recipe-time {
  color: var(--bs-dark);
  margin-left: 0;
  text-align: left;
  margin-bottom: 0.25rem;
}

.recipe-ingredients {
  font-style: italic;
  margin-top: auto;
}

/* Recipe Source Link Styles */
.recipe-source a,
.recipe-source a:link,
.recipe-source a:visited {
  color: var(--bs-dark);
  text-decoration: none;
  transition: color 0.3s ease;
}

.recipe-source a:active,
.recipe-source a:hover {
  color: var(--bs-orange);
}


/* Recipe Card Bookmark Styles */
.recipe-card .bookmark-container {
  position: absolute;
  top: 4px;
  right: 8px;
  z-index: 10;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 4px;
  padding: 0px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
}

.recipe-card .bookmark-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.recipe-card .bookmark-icon svg {
  width: 24px;
  height: 24px;
  filter: drop-shadow(0px 0px 2px rgba(0, 0, 0, 0.5));
}

.recipe-card .bookmark-icon svg path {
  fill: none;
  stroke: var(--bs-white);
  stroke-width: 2px;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.recipe-card a.bookmark-icon:hover svg path {
  fill: var(--bs-orange);
  stroke: var(--bs-orange);
}

.recipe-card .bookmark-icon.bookmarked svg path {
  fill: var(--bs-orange);
  stroke: var(--bs-orange);
}

.recipe-card .bookmark-icon.bookmarked:hover svg path {
  fill: var(--bs-orange);
  stroke: var(--bs-orange);
}

/* Ensure in-page scroll to notes accounts for fixed/sticky headers */
.my-notes {
  scroll-margin-top: 80px;
}


/* cluster layout - removed problematic overflow-y: auto rule that was creating duplicate scrollers */

.cluster {
  margin-bottom: 2rem;
}

.recipe-row {
  display: flex;
  overflow-x: auto;
  gap: 1rem;
  padding-bottom: 1rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.recipe-row::-webkit-scrollbar {
  height: 6px;
}

.recipe-row::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.recipe-row::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 3px;
}

.recipe-row::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.cluster-title {
  position: sticky;
  left: 0;
  background: white;
  padding: 0.5rem 0;
  margin-bottom: 1rem;
  z-index: 1;
  font-size: 1.5rem;
}

/* Page Title Styles */
.page-title {
  font-size: 3rem;
  font-weight: 600;
  color: var(--bs-black);
  margin-bottom: 1rem;
}