/* Daily Diet Recipe - Public Styles */

/* レシピコンテナ */
.ddr-recipe-container {
    margin: 20px 0;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ddr-recipe-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
}

.ddr-recipe-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.ddr-recipe-title {
    font-size: 28px;
    margin: 0 0 15px 0;
    color: #333;
}

/* メタ情報 */
.ddr-recipe-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.ddr-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
    font-size: 14px;
}

.ddr-meta-item .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.difficulty-easy { color: #4CAF50; }
.difficulty-medium { color: #FF9800; }
.difficulty-hard { color: #F44336; }

/* 栄養情報 */
.ddr-nutritional-info {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.ddr-nutritional-info h3 {
    margin-top: 0;
    color: #333;
}

.ddr-nutrition-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.nutrition-item {
    text-align: center;
    padding: 10px;
    background: white;
    border-radius: 5px;
    border: 1px solid #e0e0e0;
}

.nutrition-item.highlight {
    background: #FFE082;
    border-color: #FFC107;
}

.nutrition-value {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    display: block;
}

.nutrition-label {
    font-size: 12px;
    color: #666;
    display: block;
    margin-top: 5px;
}

/* 材料リスト */
.ddr-ingredients {
    margin: 20px 0;
}

.ddr-ingredients h3 {
    color: #333;
    margin-bottom: 15px;
}

.ddr-ingredients-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ingredient-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.ingredient-item:hover {
    background: #f9f9f9;
}

.ingredient-name {
    font-weight: 500;
}

.ingredient-amount {
    color: #666;
}

/* 調理手順 */
.ddr-instructions {
    margin: 20px 0;
}

.ddr-instructions h3 {
    color: #333;
    margin-bottom: 15px;
}

.ddr-instructions-list {
    counter-reset: step-counter;
    list-style: none;
    padding: 0;
}

.instruction-item {
    position: relative;
    padding-left: 50px;
    margin-bottom: 20px;
    counter-increment: step-counter;
}

.instruction-item::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 36px;
    height: 36px;
    background: #4CAF50;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.instruction-text {
    line-height: 1.6;
    color: #333;
}

/* レシピフッター */
.ddr-recipe-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.ddr-categories,
.ddr-tags {
    margin: 10px 0;
}

.ddr-categories .label {
    font-weight: bold;
    margin-right: 10px;
}

.category-link,
.tag-link {
    display: inline-block;
    margin: 0 5px 5px 0;
    padding: 5px 10px;
    background: #f0f0f0;
    border-radius: 15px;
    text-decoration: none;
    color: #666;
    font-size: 14px;
    transition: all 0.2s;
}

.category-link:hover,
.tag-link:hover {
    background: #4CAF50;
    color: white;
}

/* レシピグリッド */
.ddr-recipe-list {
    margin: 20px 0;
}

.ddr-recipe-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

.ddr-recipe-list.columns-1 .ddr-recipe-grid {
    grid-template-columns: 1fr;
}

.ddr-recipe-list.columns-2 .ddr-recipe-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.ddr-recipe-list.columns-3 .ddr-recipe-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.ddr-recipe-list.columns-4 .ddr-recipe-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* レシピカード */
.ddr-recipe-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.recipe-card-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

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

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

.recipe-card-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}

.recipe-card-title a:hover {
    color: #4CAF50;
}

.recipe-card-meta {
    display: flex;
    gap: 15px;
    margin: 10px 0;
    font-size: 13px;
    color: #666;
}

.recipe-card-meta .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    vertical-align: middle;
}

.recipe-card-excerpt {
    color: #666;
    font-size: 14px;
    line-height: 1.4;
    margin: 10px 0;
}

.recipe-card-link {
    display: inline-block;
    color: #4CAF50;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.recipe-card-link:hover {
    color: #45a049;
}

/* カレンダー */
.ddr-recipe-calendar {
    margin: 20px 0;
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.calendar-header h3 {
    text-align: center;
    margin: 0 0 20px 0;
    color: #333;
}

.calendar-table {
    width: 100%;
    border-collapse: collapse;
}

.calendar-table th {
    background: #4CAF50;
    color: white;
    padding: 10px;
    text-align: center;
    font-weight: 500;
}

.calendar-table td {
    border: 1px solid #e0e0e0;
    padding: 10px;
    height: 80px;
    vertical-align: top;
    position: relative;
}

.calendar-table td.empty {
    background: #f9f9f9;
}

.calendar-table td.has-recipe {
    background: #E8F5E9;
}

.day-number {
    font-weight: bold;
    margin-bottom: 5px;
}

.day-recipes {
    font-size: 12px;
}

.day-recipes .recipe-link {
    display: block;
    color: #4CAF50;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 今日のレシピ */
.ddr-today-recipe {
    margin: 20px 0;
}

.today-recipe-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
}

.today-title {
    margin: 0 0 20px 0;
    font-size: 24px;
}

.today-image img {
    max-width: 100%;
    border-radius: 8px;
    margin: 20px 0;
}

.today-recipe-card .recipe-title {
    margin: 20px 0;
}

.today-recipe-card .recipe-title a {
    color: white;
    text-decoration: none;
    font-size: 22px;
}

.recipe-summary {
    margin: 20px 0;
    line-height: 1.6;
}

.view-recipe-btn {
    display: inline-block;
    background: white;
    color: #764ba2;
    padding: 10px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    transition: transform 0.2s;
}

.view-recipe-btn:hover {
    transform: scale(1.05);
}

/* ウィジェット */
.ddr-widget-recipes {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget-recipe-item {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.widget-recipe-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.widget-recipe-thumbnail {
    flex-shrink: 0;
}

.widget-recipe-thumbnail img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
}

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

.widget-recipe-title {
    display: block;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    margin-bottom: 5px;
    transition: color 0.2s;
}

.widget-recipe-title:hover {
    color: #4CAF50;
}

.widget-recipe-meta {
    font-size: 12px;
    color: #999;
}

.widget-recipe-meta span {
    margin-right: 10px;
}

/* ページネーション */
.ddr-pagination {
    text-align: center;
    margin: 30px 0;
}

.ddr-pagination .page-numbers {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 3px;
    background: #f0f0f0;
    color: #666;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.2s;
}

.ddr-pagination .page-numbers:hover {
    background: #4CAF50;
    color: white;
}

.ddr-pagination .page-numbers.current {
    background: #4CAF50;
    color: white;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .ddr-recipe-grid {
        grid-template-columns: 1fr !important;
    }
    
    .ddr-nutrition-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .calendar-table {
        font-size: 12px;
    }
    
    .calendar-table td {
        height: 60px;
        padding: 5px;
    }
}

@media (max-width: 480px) {
    .ddr-recipe-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .instruction-item {
        padding-left: 40px;
    }
    
    .instruction-item::before {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
}
