/* My Recipes Page Styles */

.my-recipes-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

.my-recipes-header {
  margin-bottom: 2rem;
  text-align: center;
}

.my-recipes-header h1 {
  color: #644ae2;
  margin: 0;
}

.recipes-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-bottom: 2rem;
}

.recipe-card {
  background: #2a2a2a;
  border: 1px solid #444444;
  border-radius: 8px;
  padding: 0;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  
  /* Background image properties */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.recipe-card:hover {
  border-color: #644ae2;
  box-shadow: 0px 0px 16px 1px rgba(100, 74, 226, 0.5);
  z-index: 2;
}

.recipe-card:hover .recipe-card-overlay {
  background: rgba(0, 0, 0, 0);
}

/* When a recipe card has an open menu, it should be above other cards */
.recipe-card.menu-open {
  z-index: 10000;
}

/* Recipe card overlay for better text readability over background images */
.recipe-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(20px);
  z-index: 1;
}

/* Additional gradient overlay from right edge for action buttons readability */
.recipe-card-overlay::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 200px;
  background: linear-gradient(to left, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 100%);
  z-index: 1;
}

/* Keep gradient overlay persistent during hover (don't make it transparent) */
.recipe-card:hover .recipe-card-overlay::after {
  background: linear-gradient(to left, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 100%);
}

/* Recipe card content wrapper */
.recipe-card-content {
  position: relative;
  z-index: 2;
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 0;
}

.recipe-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.1rem;
}

.recipe-top-section {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
  flex-shrink: 0;
  min-width: fit-content;
}

.recipe-name {
  font-size: 3.4rem;
  font-family: "gluten-variable", sans-serif;
  font-weight: 600;
  color: #ffffff;
  margin: 0;
  line-height: 0.8;
  flex: 1;
  min-width: 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.recipe-style {
  color: #ffffff;
  font-size: 1.2rem;
  font-family: "grandstander-variable", sans-serif;
  font-style: italic;
  font-weight: 300;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

.recipe-date {
  color: #cccccc;
  font-size: 0.8rem;
  line-height: 1;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.recipe-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: auto;
}

.recipe-info-group {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.recipe-privacy-status {
  cursor: pointer;
  transition: opacity 0.2s ease;
  white-space: nowrap;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
  font-weight: 500;
  opacity: 0.8;
}

.recipe-privacy-status:hover {
  opacity: 1;
}

.simple-action-btn {
  padding: 0.25rem;
  font-size: 0.9rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #333333;
  color: #e0e0e0;
  border: 1px solid #444444;
  min-width: 1.8rem;
  height: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.simple-action-btn:hover {
  background: #444444;
}

.simple-action-btn.share-btn {
  background: #1c374c;
  color: white;
  border-color: #1976d2;
}

.simple-action-btn.share-btn:hover {
  background: #004385;
  border-color: #349bff;
}

.simple-action-btn.delete-btn {
  background: #282828;
  color: #e0e0e0;
  border-color: #626262;
}

.simple-action-btn.delete-btn:hover {
  background: #630000;
  border-color: #fc638c;
}

.recipe-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  align-items: flex-end;
}

.recipe-action-btn {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  font-weight: 500;
}

.recipe-action-btn.primary {
  flex: 2;
  background: #644ae2;
  color: white;
}

.recipe-action-btn.primary:hover {
  background: color-mix(in srgb, #644ae2 85%, black);
}

.recipe-action-btn.secondary {
  flex: 1;
  background: #333333;
  color: #e0e0e0;
  border: 1px solid #444444;
}

.recipe-action-btn.secondary:hover {
  background: #444444;
}

/* Recipe Menu Dropdown */
.recipe-menu-container {
  position: relative;
  z-index: 1;
}

.recipe-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: #2a2a2a;
  border: 1px solid #444444;
  border-radius: 4px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  min-width: 160px;
  margin-top: 2px;
}

.recipe-menu.hidden {
  display: none;
}

.menu-item {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  background: none;
  border: none;
  color: #e0e0e0;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.menu-item:hover {
  background: #644ae2;
  color: white;
}

.menu-item:first-child {
  border-radius: 4px 4px 0 0;
}

.menu-item:last-child {
  border-radius: 0 0 4px 4px;
}

.load-btn {
  background: #644ae2;
  color: white;
}

.load-btn:hover {
  background: color-mix(in srgb, #644ae2 85%, black);
}

.share-btn {
  background: #51cf66;
  color: white;
}

.share-btn:hover {
  background: color-mix(in srgb, #51cf66 85%, black);
}

.privacy-btn {
  background: #ff9800;
  color: white;
}

.privacy-btn:hover {
  background: color-mix(in srgb, #ff9800 85%, black);
}

.delete-btn {
  background: #e57373;
  color: white;
}

.delete-btn:hover {
  background: #c82333;
}

.empty-state {
  text-align: center;
  padding: 3rem;
  color: #888;
}

.empty-state p {
  font-size: 1.1rem;
  margin: 0;
}

/* Loading state */
.loading-recipes {
  text-align: center;
  padding: 3rem;
  color: #888;
}

/* Share modal */
.share-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 15000;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(3px);
}

.share-modal .modal-content {
  background: #2a2a2a;
  border: 1px solid #444444;
  border-radius: 8px;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  position: relative;
  z-index: 1;
}

.share-url-container {
  margin-top: 1rem;
}

.share-url-input {
  flex: 1;
  padding: 0.5rem;
  background: #121212;
  border: 1px solid #444444;
  border-radius: 4px;
  color: #e0e0e0;
  font-family: monospace;
  font-size: 12.5px;
}

.copy-btn {
  padding: 0.5rem 1rem;
  background: #644ae2;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.copy-btn:hover {
  background: color-mix(in srgb, #644ae2 85%, black);
}

.copy-btn.copied {
  background: #51cf66;
}

/* Toast notification */
.recipe-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #51cf66;
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 4px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
  z-index: 16000;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.recipe-toast.error {
  background: #e57373;
}

.recipe-toast.success {
  background: #51cf66;
}

.recipe-toast.info {
  background: #2196f3;
}

/* Privacy Dialog */
.privacy-dialog-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 15000;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(3px);
}

.privacy-dialog-modal .modal-content {
  background: #2a2a2a;
  border: 1px solid #444444;
  border-radius: 8px;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  position: relative;
  z-index: 1;
}

.privacy-dialog-modal h3 {
  color: #644ae2;
  margin: 0 0 1rem 0;
  font-size: 1.2rem;
}

.privacy-dialog-modal p {
  color: #e0e0e0;
  margin: 0 0 1.5rem 0;
  line-height: 1.5;
}

.privacy-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.privacy-option {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: #333333;
  border: 2px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.privacy-option:hover {
  border-color: #644ae2;
  background: color-mix(in srgb, #644ae2 10%, #333333);
}

.privacy-icon {
  font-size: 1.5rem;
  min-width: 1.5rem;
}

.privacy-info {
  flex: 1;
}

.privacy-info strong {
  display: block;
  color: #e0e0e0;
  font-size: 1rem;
  margin-bottom: 0;
}

.privacy-info p {
  color: #b0b0b0;
  font-size: 0.875rem;
  margin: 0;
  line-height: 1.3;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
}

.btn-cancel {
  padding: 0.75rem 1.5rem;
  background: #666;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

.btn-cancel:hover {
  background: #777;
}

