/* Recipe Detail Page Styles */
.recipe-mainbody-container {
    display: grid;
    grid-template-columns: 2fr 11fr 5fr;
    padding-top: 80px;
    background-color: #def1f1;
    min-height: calc(100vh - 60px);
}

.recipe-messages {
    margin-bottom: 20px;
    width: 100%;
}

.recipe-message {
    padding: 12px 20px;
    margin-bottom: 15px;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
    animation: fadeInOut 5s ease-in-out;
}

.recipe-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.recipe-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

.recipe-recipebody-container {
    display: grid;
    max-width: 1000px;
    padding: 20px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    margin-bottom: 40px;
}

.recipe-header-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.recipe-tags-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.recipe-cuisine {
    font-size: 18px;
    font-weight: 500;
    color: #555;
    margin: 0;
}

.recipe-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.recipe-tag {
    background-color: #e9f7f7;
    color: #007bff;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 14px;
    font-weight: 500;
}

.recipe-tag-empty {
    color: #999;
    font-style: italic;
}

.recipe-selection-form {
    margin: 0;
}

.recipe-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #ff7f50;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.recipe-add-btn:hover {
    background-color: #ff6347;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.recipe-add-btn.recipe-selected {
    background-color: #28a745;
}

.recipe-add-btn.recipe-selected:hover {
    background-color: #218838;
}

/* Animation for selection feedback */
@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.recipe-add-btn.animate-selection {
    animation: pulse 0.5s ease-in-out;
}

.recipe-title {
    font-size: 32px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    text-align: left;
}

.recipe-description {
    font-size: 18px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 30px;
}

.recipe-recipebody-card-container {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.recipe-recipebody-image-container {
    width: 100%;
    max-height: 500px;
    overflow: hidden;
}

.recipe-recipebody-img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
    transition: transform 0.5s ease;
}

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

.recipe-recipebody-cardinfo-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    text-align: center;
}

.recipe-recipebody-cardinfo-cookingtimetop,
.recipe-recipebody-cardinfo-servingstop,
.recipe-recipebody-cardinfo-caloriestop {
    background-color: #ff7f50;
    color: white;
    padding: 10px 0;
    text-align: center;
    font-weight: bold;
    border: 2px solid white;
}

.recipe-recipebody-cardinfo-cookingtimebottom,
.recipe-recipebody-cardinfo-servingsbottom,
.recipe-recipebody-cardinfo-caloriesbottom {
    text-align: center;
    font-size: 25px;
    padding: 12px 0;
    background-color: #f9f9f9;
}

.recipe-section-heading {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin: 30px 0 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #def1f1;
}

.recipe-recipebody-ingredients {
    list-style-type: none;
    padding: 0;
}

.recipe-recipebody-ingredients li {
    padding: 10px 15px;
    margin-bottom: 8px;
    background-color: #f9f9f9;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: background-color 0.3s ease;
}

.recipe-recipebody-ingredients li::before {
    content: "•";
    color: #ff7f50;
    font-size: 24px;
    margin-right: 10px;
}

.recipe-recipebody-ingredients li:hover {
    background-color: #f0f0f0;
}

.recipe-recipebody-steps-container {
    list-style-type: none;
    padding: 0;
    counter-reset: step-counter;
}

.recipe-recipebody-step {
    display: flex;
    flex-direction: column;
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 12px;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.recipe-recipebody-step:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.recipe-recipebody-step::before {
    content: counter(step-counter);
    counter-increment: step-counter;
    position: absolute;
    top: -15px;
    left: -15px;
    width: 40px;
    height: 40px;
    background-color: #ff7f50;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.recipe-recipebody-step-image {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
    margin-bottom: 15px;
    align-self: center;
}

.recipe-recipebody-step-content {
    line-height: 1.6;
    width: 100%;
    padding: 5px 0;
}

.recipe-recipebody-step-content strong {
    display: block;
    margin-bottom: 10px;
    color: #333;
    font-size: 18px;
    border-bottom: 1px solid #eaeaea;
    padding-bottom: 8px;
}

.recipe-recipebody-no-steps {
    font-style: italic;
    color: #999;
    text-align: center;
    padding: 20px;
}

.recipe-difficulty {
    margin-bottom: 20px;
    font-size: 18px;
    color: #555;
}

.recipe-allergens-list {
    margin: 0;
    padding: 0;
    list-style-type: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.recipe-allergens-list li {
    background-color: #ffe0e0;
    color: #d9534f;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
}

.recipe-allergens-list li::before {
    content: "⚠️";
    margin-right: 5px;
}

.recipe-actions {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #def1f1;
}

.recipe-action-bottom {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.recipe-action-bottom.recipe-add-btn {
    display: flex;
    justify-content: center;
    font-size: 18px;
    padding: 15px 25px;
}

/* Responsive design */
@media (max-width: 768px) {
    .recipe-mainbody-container {
        grid-template-columns: 1fr;
        padding-top: 60px;
    }

    .recipe-recipebody-container {
        width: 95%;
        margin: 10px auto;
        padding: 15px;
    }

    .recipe-header-meta {
        flex-direction: column;
        gap: 15px;
    }

    .recipe-title {
        font-size: 26px;
    }

    .recipe-recipebody-step {
        padding: 15px;
    }

    .recipe-recipebody-step::before {
        top: -10px;
        left: 50%;
        transform: translateX(-50%);
        width: 35px;
        height: 35px;
        font-size: 18px;
    }

    .recipe-recipebody-step-image {
        max-width: 100%;
    }

    .recipe-recipebody-cardinfo-container {
        grid-template-columns: 1fr;
    }

    .recipe-recipebody-cardinfo-cookingtimetop,
    .recipe-recipebody-cardinfo-servingstop,
    .recipe-recipebody-cardinfo-caloriestop {
        border-top-left-radius: 8px;
        border-top-right-radius: 8px;
    }

    .recipe-recipebody-cardinfo-caloriesbottom {
        border-bottom-left-radius: 8px;
        border-bottom-right-radius: 8px;
        margin-bottom: 15px;
    }

    .recipe-tags-container {
        width: 100%;
    }

    .recipe-selection-form {
        width: 100%;
        display: flex;
        justify-content: center;
        margin-top: 10px;
    }

    .recipe-action-bottom.recipe-add-btn {
        font-size: 16px;
        padding: 12px 20px;
    }
}

@media (max-width: 480px) {
    .recipe-recipebody-container {
        padding: 10px;
    }

    .recipe-description {
        font-size: 16px;
    }

    .recipe-section-heading {
        font-size: 20px;
    }

    .recipe-add-btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .recipe-title {
        font-size: 22px;
    }

    .recipe-recipebody-cardinfo-cookingtimebottom,
    .recipe-recipebody-cardinfo-servingsbottom,
    .recipe-recipebody-cardinfo-caloriesbottom {
        font-size: 20px;
    }
}