/* Recipe Detail Layout */
.recipe-detail {
  max-width: 1400px; /* Increased from 1200px */
  margin: 0 auto;
  padding: 20px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Main Content */
.recipe-content {
  max-width: 1200px; /* Increased from 900px */
  margin: 0 auto;
  width: 100%;
}

/* Recipe Info Section */
.recipe-info {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 30px;
}

/* Two Column Layout for Desktop */
.recipe-columns {
  display: flex;
  gap: 40px; /* Increased from 30px */
  margin-top: 30px;
}

.recipe-sidebar {
  flex: 0 0 400px; /* Increased from 350px */
  background: #f8f9fa;
  border-radius: 8px;
  padding: 25px; /* Increased from 20px */
}

.recipe-main-content {
  flex: 1;
}

/* Header */
.recipe-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e0e0e0;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #666;
  font-size: 14px;
}

.breadcrumb-link {
  color: #007bff;
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumb-link:hover {
  color: #0056b3;
  text-decoration: underline;
}

.breadcrumb-separator {
  color: #999;
  font-weight: bold;
}

.breadcrumb-current {
  color: #333;
  font-weight: 500;
}

.recipe-actions {
  display: flex;
  gap: 10px;
}

.edit-button, .back-button {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.edit-button {
  background: #28a745;
  color: white;
}

.edit-button:hover {
  background: #218838;
  transform: translateY(-1px);
}

.back-button {
  background: #6c757d;
  color: white;
}

.back-button:hover {
  background: #545b62;
  transform: translateY(-1px);
}

/* Main Content */
.recipe-content {
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
  display: block; /* Ensure block layout */
}

/* Recipe Info Section */
.recipe-info {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 30px;
  display: block; /* Force block layout instead of flex */
  width: 100%;
}

/* Force single column layout for all children */
.recipe-info > * {
  width: 100%;
  display: block; /* Force all children to be block elements */
  margin-bottom: 20px;
}

/* Ensure no grid or multi-column layouts */
.recipe-info .recipe-description,
.recipe-info .recipe-meta,
.recipe-info .recipe-section {
  width: 100% !important;
  display: block !important;
  float: none !important;
  position: relative !important;
}

.recipe-title-section {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e0e0e0;
}

.recipe-title {
  margin: 0;
  font-size: 2.2em;
  font-weight: 700;
  color: #333;
  line-height: 1.2;
}

.recipe-number {
  background: #007bff;
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.9em;
  font-weight: 600;
  flex-shrink: 0;
}

/* Main Recipe Image */
.main-recipe-image {
  margin: 25px 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  background: #f8f9fa;
  max-height: 400px;
}

.main-recipe-image img {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.main-recipe-image:hover img {
  transform: scale(1.02);
}

.recipe-description {
  margin-bottom: 25px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #007bff;
}

.recipe-description p {
  margin: 0;
  font-size: 1.1em;
  line-height: 1.6;
  color: #555;
}

/* Recipe Links */
.recipe-link {
  color: #007bff;
  text-decoration: none;
  border-bottom: 1px dotted #007bff;
  transition: all 0.3s ease;
}

.recipe-link:hover {
  color: #0056b3;
  text-decoration: none;
  border-bottom: 1px solid #0056b3;
  background-color: rgba(0, 123, 255, 0.1);
  padding: 1px 2px;
  border-radius: 3px;
}

.recipe-meta {
  display: block !important; /* Force block layout instead of flex */
  gap: 0 !important;
  margin-bottom: 30px !important;
  padding: 20px !important;
  background: #f8f9fa !important;
  border-radius: 8px !important;
  width: 100% !important;
  grid-template-columns: none !important;
  flex-direction: column !important;
}

.meta-item {
  display: block !important; /* Force block layout */
  margin-bottom: 15px !important;
  width: 100% !important;
  float: none !important;
  flex: none !important;
}

.meta-label {
  font-size: 0.9em;
  color: #666;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.meta-value {
  font-size: 1.1em;
  font-weight: 600;
  color: #333;
}

/* Recipe Sections */
.recipe-section {
  margin-bottom: 30px;
}

.recipe-section h3 {
  margin: 0 0 15px 0;
  font-size: 1.4em;
  font-weight: 600;
  color: #333;
  padding-bottom: 8px;
  border-bottom: 2px solid #007bff;
  display: inline-block;
}

/* Ingredients */
.ingredients-content {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
}

.ingredient-item {
  padding: 8px 0;
  position: relative;
  padding-left: 20px;
}

.ingredient-item:last-child {
  border-bottom: none;
}

.ingredient-item::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #007bff;
  font-weight: bold;
  font-size: 1.2em;
}

/* Preparation */
.preparation-content {
  background: #fff3cd;
  border-radius: 8px;
  padding: 20px;
  border-left: 4px solid #ffc107;
}

.preparation-step {
  margin: 0 0 5px 0;
  line-height: 1.4;
}

.preparation-step:last-child {
  margin-bottom: 0;
}

/* Instructions */
.instructions-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.instruction-step-with-image {
  display: flex;
  gap: 20px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #28a745;
  align-items: flex-start;
}

.step-image {
  flex-shrink: 0;
  width: 200px;
  height: 150px;
  border-radius: 8px;
  overflow: hidden;
  background: #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.step-image img:hover {
  transform: scale(1.05);
}

.instruction-step {
  display: flex;
  gap: 15px;
  flex: 1;
  align-items: flex-start;
}

.step-number {
  background: #28a745;
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 2px;
}

.step-text {
  margin: 0;
  line-height: 1.6;
  color: #333;
  flex: 1;
}

/* Comment */
.comment-content {
  background: #d1ecf1;
  border-radius: 8px;
  padding: 20px;
  border-left: 4px solid #17a2b8;
}

.recipe-comment {
  margin: 0;
  font-style: italic;
  line-height: 1.6;
  color: #333;
}

/* Image Management */
.image-management {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 25px;
  margin: 30px 0;
  border: 1px solid #e0e0e0;
}

.image-management h3 {
  margin: 0 0 20px 0;
  color: #333;
  font-size: 1.3em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.image-management h3::before {
  content: "📸";
  font-size: 1.2em;
}

.upload-section {
  margin-bottom: 30px;
  padding-bottom: 25px;
  border-bottom: 1px solid #e0e0e0;
}

.upload-section h4,
.existing-images h4 {
  margin: 0 0 15px 0;
  color: #555;
  font-size: 1.1em;
}

.existing-images {
  margin-top: 20px;
}

.images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 15px;
}

.image-item {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.image-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.image-preview {
  position: relative;
  width: 100%;
  height: 150px;
  overflow: hidden;
}

.image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.image-preview:hover img {
  transform: scale(1.05);
}

.delete-image-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(220, 53, 69, 0.9);
  color: white;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.3s ease;
  opacity: 0;
}

.image-item:hover .delete-image-btn {
  opacity: 1;
}

.delete-image-btn:hover {
  background: rgba(200, 35, 51, 0.9);
  transform: scale(1.1);
}

.image-info {
  padding: 12px;
  text-align: center;
}

.image-name {
  display: block;
  font-size: 0.9em;
  color: #666;
  margin-bottom: 5px;
  word-break: break-word;
}

.main-image-badge {
  background: #007bff;
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.8em;
  font-weight: 500;
}

.upload-progress {
  margin-top: 15px;
  background: #e9ecef;
  border-radius: 10px;
  overflow: hidden;
  height: 8px;
}

.upload-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #007bff, #0056b3);
  transition: width 0.3s ease;
}

.upload-progress-text {
  font-size: 0.9em;
  color: #666;
  margin-top: 8px;
  text-align: center;
  display: block;
}

/* Error States */
.error, .not-found {
  text-align: center;
  padding: 60px 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.error h3, .not-found h3 {
  color: #dc3545;
  margin-bottom: 15px;
}

.error-actions {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 15px;
}

.retry-button {
  background: #007bff;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
}

.retry-button:hover {
  background: #0056b3;
  transform: translateY(-1px);
}

/* Loading */
.loading {
  text-align: center;
  padding: 60px 20px;
  font-size: 1.2em;
  color: #666;
}

/* Responsive Design */
/* Large screens - extra wide layout */
@media (min-width: 1400px) {
  .recipe-detail {
    max-width: 1600px;
    padding: 30px;
  }
  
  .recipe-content {
    max-width: 1400px;
  }
  
  .recipe-columns {
    gap: 50px;
  }
  
  .recipe-sidebar {
    flex: 0 0 450px;
    padding: 30px;
  }
  
  .recipe-info {
    padding: 40px;
  }
}

@media (max-width: 768px) {
  .recipe-detail {
    padding: 15px;
  }
  
  .recipe-header {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }
  
  .recipe-content {
    max-width: 100%;
  }
  
  .recipe-info {
    padding: 20px;
  }
  
  .recipe-title {
    font-size: 1.8em;
  }
  
  .recipe-meta {
    flex-direction: column;
    gap: 15px;
  }

  /* Stack columns on mobile */
  .recipe-columns {
    flex-direction: column;
    gap: 20px;
  }

  .recipe-sidebar {
    flex: none;
  }
  
  .instruction-step-with-image {
    flex-direction: column;
    gap: 15px;
  }
  
  .step-image {
    width: 100%;
    height: 200px;
    align-self: center;
  }
  
  .instruction-step {
    flex-direction: column;
    gap: 10px;
  }
  
  .step-number {
    align-self: flex-start;
  }
}

@media (max-width: 480px) {
  .recipe-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .edit-button, .back-button {
    justify-content: center;
  }
  
  .breadcrumb {
    flex-wrap: wrap;
  }
  
  .thumbnail {
    width: 50px;
    height: 50px;
  }
}/* Force reload */
