/* Styles for Recipe Detail Pages - Hertz-inspired design */

:root {
    --black-primary: #1E2328;    /* Dark black for headers and important text */
    --black-secondary: #2A2E34;  /* Slightly lighter black for secondary elements */
    --black-tertiary: #3B3F46;   /* Even lighter black for tertiary elements */
    --yellow-primary: #F5B301;   /* Bright yellow for call-to-action elements */
    --yellow-secondary: #FED053; /* Lighter yellow for secondary highlights */
    --gray-light: #f5f5f7;       /* Light gray for backgrounds */
    --gray-medium: #e5e5e5;      /* Medium gray for borders */
    --text-dark: #333333;        /* Dark text color */
    --text-medium: #666666;      /* Medium gray text */
    --text-light: #999999;       /* Light gray text */
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    margin: 0;
    padding: 0;
    background-color: #ffffff;
}

/* Recipe Detail Container */
.recipe-detail-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    /* Shadow removed as requested */
    border-radius: 8px;
}

/* Header */
.recipe-detail-container header {
    text-align: center;
    margin-bottom: 30px;
}

.logo-container {
    margin-bottom: 20px;
}

.logo {
    max-width: 180px;
    height: auto;
}

/* Updated title color to gold */
.recipe-detail-container h1 {
    color: var(--yellow-primary);
    margin: 0;
    font-size: 2.2rem;
    font-weight: 600;
}

.recipe-detail-container header p {
    color: var(--text-medium);
    margin-top: 5px;
    font-size: 1rem;
}

/* Updated recipe image with fixed dimensions for desktop */
.recipe-detail-image {
    width: 400px;
    height: 400px;
    max-width: 100%; /* For mobile responsiveness */
    object-fit: contain; /* Keeps aspect ratio */
    border-radius: 8px;
    margin: 20px auto;
    display: block;
}

/* For smaller screens, allow image to be responsive */
@media (max-width: 480px) {
    .recipe-detail-image {
        width: 100%;
        height: auto;
    }
}

/* Recipe Meta Information - Updated to fix icon alignment */
.recipe-detail-meta {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.meta-item {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100px; /* Set fixed width for consistent alignment */
}

/* New meta-icon class for better alignment */
.meta-icon {
    font-size: 24px;
    color: var(--yellow-primary);
    display: block;
    margin-bottom: 5px;
    line-height: 1;
}

/* For backward compatibility with existing i elements */
.meta-item i {
    font-size: 24px;
    color: var(--yellow-primary);
    display: block;
    margin-bottom: 5px;
    line-height: 1;
}

.meta-label {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 2px;
}

.meta-value {
    font-weight: bold;
    font-size: 16px;
    color: var(--text-dark);
    line-height: 1.2;
}

/* Section Titles */
.section-title {
    background-color: var(--black-primary);
    color: white;
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-weight: 500;
}

/* Ingredients */
.ingredients-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

.ingredient-card {
    border: 1px solid var(--gray-medium);
    border-radius: 8px;
    padding: 15px;
    width: calc(33.33% - 20px);
    box-sizing: border-box;
    background-color: var(--gray-light);
}

@media (max-width: 768px) {
    .ingredient-card {
        width: calc(50% - 20px);
    }
}

@media (max-width: 480px) {
    .ingredient-card {
        width: 100%;
    }
}

.ingredient-name {
    font-weight: bold;
    margin-bottom: 5px;
    color: var(--black-primary);
}

.ingredient-measure {
    color: var(--text-medium);
    font-size: 14px;
}

/* Instructions */
.instructions {
    margin-bottom: 30px;
}

.instructions ol {
    padding-left: 20px;
}

.instructions li {
    margin-bottom: 10px;
    color: var(--text-dark);
    padding-left: 5px;
}

/* Container for button centering */
.button-container {
    display: flex;
    justify-content: center;
    margin: 30px 0;
    width: 100%;
}

/* Instacart Button Styling */
.instacart-button {
    /* Core button styling */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 46px; /* Exact height per guidelines */
    background-color: #FAF1E5;
    color: #003D29;
    text-decoration: none;
    border-radius: 23px; /* Half of height for perfect round corners */
    border: 0.5px solid #EFE9E1;

    /* Text styling */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: bold;
    font-size: 16px;
    white-space: nowrap; /* Prevents text wrapping */

    /* Padding per guidelines */
    padding: 0 18px; /* Horizontal padding only - height is fixed */
    box-sizing: border-box;

    /* Ensures the button doesn't become too small or too large */
    min-width: 220px;
    max-width: 280px; /* Fixed reasonable max width */

    /* Transition for hover effect */
    transition: background-color 0.3s;
}

.instacart-logo {
    margin-right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0; /* Prevents the logo from shrinking */
}

.instacart-logo img {
    width: 22px; /* Fixed width per guidelines */
    height: 22px; /* Fixed height per guidelines */
    display: block; /* Removes any extra space below the image */
}

.instacart-text {
    /* The text should not be modified with external padding/margin */
    line-height: 46px; /* Matches the button height */
}

/* Hover effect */
.instacart-button:hover {
    background-color: #F4E9DC;
}

/* Footer */
.recipe-detail-container footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px 0;
    color: var(--text-medium);
    font-size: 0.9rem;
    border-top: 1px solid var(--gray-medium);
}

.footer-link {
    color: var(--black-primary);
    text-decoration: none;
    font-weight: 500;
}

.footer-link:hover {
    color: var(--yellow-primary);
    text-decoration: underline;
}