/* ========================================
   Components CSS - フードレコメンドシステム
   stylish-controller-windows.js から抽出
======================================== */

/* 1. メインコンテナ系 */
.result-content {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 20px;
    background: var(--off-white);
    min-height: 100vh;
}

.analysis-container {
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 32px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.content-container {
    background: var(--white);
    border: var(--border-light);
    padding: 32px;
    box-shadow: var(--shadow-subtle);
}

/* 2. フードカードシステム */
.food-cards-container {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 8px 0;
    scroll-snap-type: x mandatory;
}

.food-card {
    width: 320px;
    flex-shrink: 0;
    background: var(--white);
    border-radius: 2px;
    border: var(--border-light);
    box-shadow: var(--shadow-subtle);
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    scroll-snap-align: start;
    transition: all 0.2s ease;
    position: relative;
    font-family: 'Noto Sans JP', 'Inter', sans-serif;
    margin-right: 16px;
}

.food-card--featured {
    border: 3px solid var(--accent);
    background: var(--white);
    box-shadow: 0 4px 12px rgba(201, 169, 110, 0.25), 0 2px 6px rgba(0, 0, 0, 0.1);
}

.food-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* 2.5. カルーセルドットインジケーター */
.carousel-dots-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 8px 0;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.carousel-dot:hover {
    background: rgba(201, 169, 110, 0.6);
    transform: scale(1.1);
}

.carousel-dot--active {
    background: var(--accent);
    transform: scale(1.2);
    box-shadow: 0 2px 8px rgba(201, 169, 110, 0.3);
}

.carousel-dot--active::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background: var(--white);
    border-radius: 50%;
}

/* 2.6. スワイプヒント */
.swipe-hint {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    color: rgba(201, 169, 110, 0.8);
    pointer-events: none;
    z-index: 2;
    transition: opacity 0.3s ease;
}

.swipe-hint--left {
    left: 8px;
    animation: swipe-hint-left 2s ease-in-out infinite;
}

.swipe-hint--right {
    right: 8px;
    animation: swipe-hint-right 2s ease-in-out infinite;
}

.swipe-hint--fade-out {
    opacity: 0;
    transition: opacity 0.5s ease;
}

@keyframes swipe-hint-left {
    0%, 100% { 
        transform: translateY(-50%) translateX(0); 
        opacity: 0.6; 
    }
    50% { 
        transform: translateY(-50%) translateX(-8px); 
        opacity: 1; 
    }
}

@keyframes swipe-hint-right {
    0%, 100% { 
        transform: translateY(-50%) translateX(0); 
        opacity: 0.6; 
    }
    50% { 
        transform: translateY(-50%) translateX(8px); 
        opacity: 1; 
    }
}

/* 3. タイポグラフィシステム */
.section-title {
    font-size: 16px;
    font-weight: 300;
    color: var(--primary);
    margin: 0;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.section-subtitle {
    font-size: 11px;
    opacity: 0.6;
    margin-left: 8px;
    text-transform: uppercase;
}

.metric-value {
    font-size: 28px;
    font-weight: 200;
    color: var(--primary);
    margin-bottom: 6px;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.5px;
}

.metric-label {
    font-size: 10px;
    color: var(--dark-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

/* 4. フードタグシステム */
.food-tag {
    padding: 2px 6px;
    border-radius: 2px;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.3px;
    margin: 2px;
    display: inline-block;
    transition: all 0.2s ease;
}

.food-tag--type { 
    background: #e3f2fd; 
    color: #1565c0; 
}

.food-tag--origin { 
    background: #e8f5e8; 
    color: #2e7d32; 
}

.food-tag--feature { 
    background: #fff3e0; 
    color: #ef6c00; 
}

.food-tag--nutrition { 
    background: #f3e5f5; 
    color: #7b1fa2; 
}

.food-tag--additive-free {
    background: #e0f2f1;
    color: #00695c;
}

.food-tag--grain-free {
    background: #fce4ec;
    color: #ad1457;
}

/* 5. ボタンシステム */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 2px;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Noto Sans JP', sans-serif;
}

.btn--primary {
    background: var(--accent);
    color: var(--white);
}

.btn--primary:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(201, 169, 110, 0.3);
}

.btn--secondary {
    background: var(--white);
    color: var(--accent);
    border: 1px solid var(--accent);
}

.btn--secondary:hover {
    background: var(--accent);
    color: var(--white);
}

/* 6. インタラクティブ要素 */
.interactive-element {
    background: var(--interactive-bg, var(--white));
    color: var(--interactive-color, var(--primary));
    border: var(--interactive-border, var(--border-light));
    transition: all 0.2s ease;
    cursor: pointer;
}

.interactive-element:hover {
    background: var(--interactive-hover-bg, var(--accent-light));
    color: var(--interactive-hover-color, var(--accent-dark));
    transform: var(--interactive-hover-transform, translateY(-1px));
}

/* 7. モーダル・スコア表示システム */
.modal-section {
    background: var(--light-gray);
    border: var(--border-light);
    padding: 24px;
    margin-bottom: 32px;
    border-radius: 4px;
}

.modal-title {
    font-size: 20px;
    font-weight: 500;
    color: var(--primary);
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--accent);
    text-align: center;
}

.modal-subtitle {
    font-size: 16px;
    font-weight: 500;
    color: var(--primary);
    margin-bottom: 16px;
    padding-left: 8px;
    border-left: 4px solid var(--accent);
}

.modal-subsection-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--accent-dark);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.score-display-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.score-item {
    text-align: center;
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    border: var(--border-light);
    padding: 20px 16px;
    border-radius: 4px;
    font-size: 13px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.score-item:hover {
    background: linear-gradient(135deg, #fafbfc 0%, #f5f6f7 100%);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
    border-color: var(--accent);
}

.score-breakdown-item {
    margin-bottom: 20px;
    background: var(--white);
    border: var(--border-light);
    padding: 16px;
    border-radius: 4px;
}

.score-value-large {
    font-size: 36px;
    font-weight: 300;
    color: var(--accent);
    margin-bottom: 8px;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.5px;
}

.score-value-medium {
    font-size: 20px;
    font-weight: 300;
    color: var(--primary);
    margin-bottom: 4px;
    font-family: 'Inter', sans-serif;
}

.score-label {
    font-size: 11px;
    color: var(--dark-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    font-weight: 500;
}

.score-detail {
    font-size: 10px;
    color: var(--dark-gray);
    line-height: 1.4;
}

.score-weight {
    font-size: 10px;
    color: var(--accent-dark);
    font-weight: 500;
    text-transform: uppercase;
}

.evaluation-criteria {
    background: var(--accent-light);
    border: 1px solid var(--accent);
    padding: 16px;
    border-radius: 4px;
    margin-bottom: 16px;
}

.distribution-explanation {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--mid-gray);
    padding: 12px;
    border-radius: 4px;
    font-size: 12px;
    color: var(--dark-gray);
    line-height: 1.6;
}

.note-box {
    background: var(--light-gray);
    border-left: 4px solid var(--accent);
    padding: 12px 16px;
    margin: 16px 0;
    font-size: 12px;
    color: var(--primary);
    border-radius: 0 4px 4px 0;
}

.warning-box {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 12px 16px;
    margin: 16px 0;
    font-size: 12px;
    color: #856404;
    border-radius: 0 4px 4px 0;
}

/* 8. モック対応 - カード形式スコア表示 */
.cards-container {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin: 24px 0;
}

.card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    padding: 16px;
    flex: 1;
    min-width: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.card__percentage {
    font-size: 2rem;
    font-weight: bold;
    color: #333333;
}

.card__title {
    margin-top: 6px;
    font-size: 0.95rem;
    color: #666666;
}

.progress-bar {
    margin-top: 10px;
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar__fill {
    height: 100%;
    transition: width 0.6s ease;
}

.score-detail {
    margin-top: 10px;
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
    width: 100%;
    color: #444444;
}

.score-detail span:last-child {
    color: #999999;
}

.overall-score {
    text-align: center;
    padding: 16px;
    border-top: 1px solid #eee;
}

.overall-score__value {
    font-size: 2.5rem;
    font-weight: bold;
    color: #cba05f;
    margin: 0;
}

.overall-score__label {
    font-size: 0.95rem;
    color: #666666;
    margin-top: 4px;
}

/* 9. レスポンシブ対応 */
@media (max-width: 768px) {
    .result-content {
        padding: 20px 16px;
    }
    
    /* モック対応 - モバイル時のカード表示 */
    .cards-container {
        flex-direction: column;
        gap: 12px;
    }
    
    .card {
        min-width: unset;
        flex: none;
    }
    
    .card__percentage {
        font-size: 1.75rem;
    }
    
    .overall-score__value {
        font-size: 2rem;
    }
    
    .analysis-container {
        padding: 20px;
        margin-bottom: 16px;
    }
    
    .food-card {
        width: 280px;
        padding: 24px 20px;
    }
    
    /* カルーセルドット - モバイル対応 */
    .carousel-dot {
        width: 16px;
        height: 16px;
    }
    
    .carousel-dots-container {
        gap: 12px;
        margin-top: 20px;
        padding: 12px 0;
    }
    
    .carousel-dot--active::after {
        width: 8px;
        height: 8px;
    }
    
    /* スワイプヒント - モバイル対応 */
    .swipe-hint {
        font-size: 20px;
    }
    
    .swipe-hint--left {
        left: 6px;
    }
    
    .swipe-hint--right {
        right: 6px;
    }
    
    .metric-value {
        font-size: 24px;
    }
    
    .section-title {
        font-size: 14px;
    }
}