/* Treat Usage Optimizer CSS */
.treat-usage-container {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow);
    margin-bottom: 40px;
}

.tool-description {
    margin-bottom: 25px;
}

.treat-usage-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-section {
    background: #f8f9fa;
    border-radius: var(--border-radius-small);
    padding: 25px;
    border: 1px solid var(--border-color);
}

.form-section h3 {
    margin-bottom: 15px;
    color: var(--accent-color);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-section-icon {
    background: var(--accent-color);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-small);
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-primary);
    background-color: var(--surface-color);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input[type="text"]:focus,
.form-group input[type="number"]:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(94, 129, 172, 0.15);
    outline: none;
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.radio-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 15px;
    background: var(--surface-color);
    border-radius: var(--border-radius-small);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.radio-item:hover {
    background: #f0f2f5;
}

.radio-item input[type="radio"] {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    cursor: pointer;
    accent-color: var(--accent-color);
}

.radio-item label {
    margin-bottom: 0;
    cursor: pointer;
    flex: 1;
    font-weight: normal;
}

.slider-container {
    margin-top: 15px;
}

.slider {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #e9ecef;
    outline: none;
    margin: 15px 0;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent-color);
    cursor: pointer;
    transition: all 0.2s;
}

.slider::-webkit-slider-thumb:hover {
    background: var(--accent-light);
    transform: scale(1.1);
}

.slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent-color);
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.slider::-moz-range-thumb:hover {
    background: var(--accent-light);
    transform: scale(1.1);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.slider-value {
    text-align: center;
    font-weight: 600;
    color: var(--accent-color);
    font-size: 1.1rem;
    margin-top: 5px;
}

.submit-button {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-light) 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    width: 100%;
    margin-top: 20px;
    box-shadow: 0 4px 12px rgba(94, 129, 172, 0.2);
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(94, 129, 172, 0.3);
}

.submit-button:active {
    transform: translateY(1px);
}

.results-container {
    display: none;
    margin-top: 40px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.results-header {
    margin-bottom: 25px;
    text-align: center;
}

.results-header h2 {
    color: var(--accent-color);
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.summary-box {
    background: white;
    border-radius: var(--border-radius-small);
    padding: 25px;
    margin-bottom: 30px;
    border-left: 5px solid var(--accent-color);
    box-shadow: var(--shadow);
}

.treat-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 30px 0;
}

.stat-card {
    flex: 1;
    min-width: 220px;
    background: white;
    border-radius: var(--border-radius-small);
    padding: 20px;
    box-shadow: var(--shadow);
    text-align: center;
}

.stat-title {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 5px;
}

.stat-unit {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.results-details {
    margin-bottom: 30px;
}

.detail-section {
    margin-bottom: 25px;
}

.detail-section h3 {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 1.3rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.food-adjustment {
    background: #e8f5e9;
    border-radius: var(--border-radius-small);
    padding: 25px;
    margin-top: 20px;
    border-left: 5px solid #4caf50;
}

.food-adjustment h3 {
    color: #2e7d32;
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 15px;
}

.feeding-plan {
    margin-top: 25px;
}

.meal-card {
    background: white;
    border-radius: var(--border-radius-small);
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-left: 3px solid var(--accent-color);
}

.meal-card h4 {
    margin-bottom: 10px;
    color: var(--text-primary);
}

.treat-visualization {
    margin: 30px 0;
    text-align: center;
}

.treat-icons {
    margin: 20px 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.treat-icon {
    font-size: 1.5rem;
    color: #ffa726;
}

.treat-distribution {
    margin-top: 30px;
}

.treat-chart {
    width: 100%;
    height: 30px;
    background: #e9ecef;
    border-radius: 15px;
    margin: 15px 0;
    overflow: hidden;
    position: relative;
}

.chart-segment {
    height: 100%;
    position: absolute;
    top: 0;
    transition: width 1s ease-out;
}

.training-segment {
    background: var(--accent-color);
    left: 0;
}

.rewards-segment {
    background: #ffa726;
    left: var(--training-width, 0);
}

.chart-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.chart-key {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
}

.key-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.key-color {
    width: 15px;
    height: 15px;
    border-radius: 3px;
}

.key-training {
    background: var(--accent-color);
}

.key-rewards {
    background: #ffa726;
}

.treat-tips {
    background: linear-gradient(135deg, #a8e063 0%, #56ab2f 100%);
    color: white;
    padding: 25px;
    border-radius: var(--border-radius-small);
    margin: 30px 0;
    position: relative;
}

.treat-tips h3 {
    color: white;
    border-bottom: none;
    margin-bottom: 15px;
    padding-bottom: 0;
}

.treat-tips ul {
    margin-left: 20px;
}

.treat-tips li {
    margin-bottom: 10px;
    color: white;
}

.print-results {
    background: var(--surface-color);
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
}

.print-results:hover {
    background: var(--accent-color);
    color: white;
}

.calorie-info {
    background: #f1f8e9;
    border-radius: var(--border-radius-small);
    padding: 15px;
    margin-top: 15px;
    font-size: 0.9rem;
    color: #558b2f;
    line-height: 1.5;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .treat-usage-container, .form-section {
        padding: 20px;
    }
    
    .treat-stats {
        flex-direction: column;
    }
    
    .stat-card {
        min-width: 100%;
    }
}

@media (max-width: 480px) {
    .treat-usage-container, .form-section {
        padding: 15px;
    }
    
    .results-container {
        padding: 20px;
    }
    
    .stat-value {
        font-size: 1.8rem;
    }
}

/* Print-specific styles */
@media print {
    .header, .theme-toggle, .back-to-top, .social-sharing, 
    .product-promo, .related-articles, .treat-usage-form {
        display: none !important;
    }
    
    body, .container {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
    }
    
    .results-container {
        display: block !important;
        page-break-inside: avoid;
    }
    
    .print-results {
        display: none !important;
    }
}