/**
 * Recipe Manager Public Styles
 */

/* Recipe Container */
.recipe-container {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    max-width: 800px;
    margin: 0 auto 40px;
    padding: 20px;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.recipe-title {
    font-size: 28px;
    margin-bottom: 20px;
    text-align: center;
    color: #333;
}

.recipe-image {
    text-align: center;
    margin-bottom: 30px;
}

.recipe-image img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.recipe-description {
    margin-bottom: 30px;
    font-style: italic;
    color: #666;
    line-height: 1.6;
}

/* Recipe Meta */
.recipe-meta {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    margin-bottom: 30px;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.recipe-meta-item {
    text-align: center;
    margin: 10px 0;
    flex: 1;
    min-width: 120px;
}

.recipe-meta-label {
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
    color: #666;
    font-size: 14px;
    text-transform: uppercase;
}

.recipe-meta-value {
    font-size: 16px;
}

/* Mobile Navigation */
.recipe-mobile-nav {
    display: none;
    background: #f5f5f5;
    border-radius: 5px;
    margin-bottom: 20px;
    overflow: hidden;
}

.recipe-mobile-nav a {
    float: left;
    display: block;
    color: #333;
    text-align: center;
    padding: 10px;
    text-decoration: none;
    width: 33.33%;
    box-sizing: border-box;
    font-weight: bold;
    font-size: 14px;
}

.recipe-mobile-nav a.active {
    background-color: #007bff;
    color: white;
}

/* Recipe Sections */
.recipe-section-title {
    margin: 30px 0 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #007bff;
    color: #007bff;
    font-size: 20px;
    font-weight: bold;
}

/* Ingredients */
.recipe-ingredients {
    margin-bottom: 30px;
}

.recipe-serving-adjuster {
    margin-bottom: 15px;
    background: #f5f5f5;
    padding: 10px;
    border-radius: 5px;
    display: flex;
    align-items: center;
}

.recipe-serving-adjuster label {
    margin-right: 10px;
    font-weight: bold;
}

.recipe-serving-adjuster input {
    width: 60px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 3px;
    text-align: center;
}

.recipe-ingredients-list {
    padding-left: 20px;
    margin-bottom: 30px;
    list-style-type: disc;
}

.recipe-ingredient-item {
    margin-bottom: 8px;
    line-height: 1.6;
}

.recipe-ingredient-amount {
    font-weight: bold;
}

.recipe-ingredient-notes {
    color: #666;
    font-style: italic;
}

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

.recipe-instructions-list {
    counter-reset: steps;
    list-style-type: none;
    padding-left: 0;
}

.recipe-instruction-item {
    position: relative;
    margin-bottom: 15px;
    padding-left: 40px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
    cursor: pointer;
}

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

.recipe-instruction-item:before {
    counter-increment: steps;
    content: counter(steps);
    position: absolute;
    left: 0;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background-color: #007bff;
    color: white;
    border-radius: 50%;
    font-weight: bold;
    transition: background-color 0.2s;
}

.recipe-instruction-item.completed {
    background-color: #f0f8ff;
    text-decoration: line-through;
    color: #666;
}

.recipe-instruction-item.completed:before {
    background-color: #6c757d;
}

/* Nutrition Facts */
.recipe-nutrition {
    margin-top: 30px;
    margin-bottom: 30px;
}

.recipe-nutrition-toggle {
    background: #f5f5f5;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    margin-bottom: 10px;
    display: block;
    width: 100%;
    text-align: left;
    color: #333;
}

.recipe-nutrition-toggle:hover {
    background: #eee;
}

.recipe-nutrition-content {
    display: none;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
}

.recipe-nutrition-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 15px;
}

.recipe-nutrition-tabs a {
    padding: 8px 15px;
    color: #333;
    text-decoration: none;
    font-weight: bold;
}

.recipe-nutrition-tabs a.active {
    border-bottom: 2px solid #007bff;
    color: #007bff;
}

.recipe-nutrition-tab-content {
    display: none;
}

/* Nutrition Facts Label */
.nutrition-facts-label {
    border: 1px solid #000;
    padding: 10px;
    max-width: 300px;
    margin: 0 auto;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    background: white;
}

.nutrition-facts-header {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 5px;
}

.nutrition-facts-calories {
    font-size: 16px;
    font-weight: bold;
    margin: 5px 0;
}

.nutrition-facts-divider {
    height: 5px;
    background: #000;
    margin: 5px 0;
}

.nutrition-facts-daily-value-header {
    font-weight: bold;
    text-align: right;
    margin: 5px 0;
}

.nutrition-facts-row {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #ccc;
    padding: 3px 0;
}

.nutrition-facts-indented {
    padding-left: 20px;
}

.nutrition-facts-footer {
    font-size: 10px;
    margin-top: 10px;
}

/* Recipe Buttons */
.recipe-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.recipe-button {
    display: inline-block;
    padding: 10px 15px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 3px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.recipe-button:hover {
    background-color: #0069d9;
    text-decoration: none;
    color: white;
}

/* Recipe Card */
.recipe-card {
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    max-width: 320px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.recipe-card-image {
    position: relative;
    height: 180px;
    overflow: hidden;
}

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

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

.recipe-card-content {
    padding: 15px;
}

.recipe-card-title {
    margin: 0 0 10px;
    font-size: 18px;
    color: #333;
}

.recipe-card-meta {
    display: flex;
    margin-bottom: 10px;
    font-size: 14px;
    color: #666;
}

.recipe-card-time, .recipe-card-difficulty {
    margin-right: 15px;
    display: flex;
    align-items: center;
}

.recipe-card-meta-icon {
    margin-right: 5px;
}

.recipe-card-nutrition {
    font-size: 12px;
    color: #666;
    margin-bottom: 15px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.recipe-card-footer {
    text-align: right;
}

.recipe-card-link {
    display: inline-block;
    padding: 8px 12px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 3px;
    font-size: 14px;
    transition: background-color 0.2s;
}

.recipe-card-link:hover {
    background-color: #0069d9;
    text-decoration: none;
    color: white;
}

/* Recipe List */
.recipe-list-container {
    margin-bottom: 30px;
}

.recipe-list-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
}

.recipe-list-grid .recipe-card {
    flex: 0 0 calc(33.333% - 20px);
    margin-bottom: 30px;
}

.recipe-list-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.recipe-list-title {
    margin: 0 0 5px;
    font-size: 18px;
}

.recipe-list-title a {
    color: #333;
    text-decoration: none;
}

.recipe-list-title a:hover {
    color: #007bff;
    text-decoration: underline;
}

.recipe-list-meta {
    font-size: 14px;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .recipe-mobile-nav {
        display: block;
    }
    
    .recipe-section {
        display: none;
    }
    
    .recipe-meta {
        flex-direction: column;
    }
    
    .recipe-meta-item {
        width: 100%;
        margin: 5px 0;
    }
    
    .recipe-list-grid .recipe-card {
        flex: 0 0 calc(50% - 10px);
    }
    
    .recipe-buttons {
        flex-direction: column;
    }
    
    .recipe-button {
        margin-bottom: 10px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .recipe-list-grid .recipe-card {
        flex: 0 0 100%;
    }
}
