/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 */

/* Import FDA standard fonts */
@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&family=Archivo:wght@400;700&display=swap');

/* Main nutrition facts label container */
.nutrition-facts-label {
    border: 2px solid #000;
    margin: 20px auto;
    padding: 10px 15px;
    font-family: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    color: #000;
    max-width: 300px;
    width: 100%;
    box-sizing: border-box;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-radius: 0;
    transition: all 0.3s ease;
}

.nutrition-facts-label:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Header section */
.nutrition-facts-header {
    padding-bottom: 8px;
}

.nutrition-facts-title {
    font-family: 'Archivo Black', 'Helvetica Neue', Arial, sans-serif;
    font-size: 26px;
    font-weight: 900;
    margin: 0;
    padding-bottom: 2px;
    letter-spacing: -0.5px;
    text-transform: uppercase;
    color: #000;
}

.nutrition-facts-serving {
    font-size: 14px;
    font-weight: 400;
    margin-top: 8px;
}

.nutrition-facts-servings-per-container {
    margin: 5px 0 0;
    font-size: 14px;
}

.nutrition-facts-serving-size-line {
    display: flex;
    justify-content: space-between;
    font-size: 16px;
    font-weight: 700;
    margin: 4px 0;
    line-height: 1.6;
}

/* Dividers */
.nutrition-facts-divider {
    height: 1px;
    background-color: #000;
    margin: 5px 0;
    border: none;
}

.nutrition-facts-divider.large {
    height: 10px;
    background-color: #000;
}

.nutrition-facts-divider.medium {
    height: 5px;
    background-color: #000;
}

.nutrition-facts-divider.small {
    height: 1px;
    background-color: #000;
}

/* Calories section */
.nutrition-facts-calories {
    display: flex;
    justify-content: space-between;
    font-size: 16px;
    padding: 7px 0;
    align-items: baseline;
}

.nutrition-facts-calories-label {
    font-family: 'Archivo Black', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 900;
    font-size: 32px;
    line-height: 1.1;
}

.nutrition-facts-calories-value {
    font-family: 'Archivo Black', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 900;
    font-size: 32px;
    line-height: 1.1;
}

/* Daily Value text */
.nutrition-facts-daily-value-text {
    text-align: right;
    font-weight: 800;
    font-size: 14px;
    padding: 3px 0;
}

/* Nutrition items */
.nutrition-facts-item {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
    border-top: 1px solid #999;
    align-items: baseline;
    line-height: 1.5;
}

.nutrition-facts-item.parent-item .nutrition-facts-item-label {
    font-weight: 800;
}

.nutrition-facts-item.parent-item {
    border-top: 1px solid #000;
}

.nutrition-facts-item.sub-item {
    padding-left: 20px;
    border-top: 1px solid #e5e5e5;
}

.nutrition-facts-item.sub-sub-item {
    padding-left: 40px;
    border-top: 1px solid #e5e5e5;
}

.nutrition-facts-item-label {
    font-weight: 400;
}

.nutrition-facts-item-value {
    font-weight: 400;
    text-align: right;
}

.nutrition-facts-item-dv {
    font-weight: 700;
    text-align: right;
    min-width: 40px;
    padding-left: 10px;
    white-space: nowrap;
}

/* Footer section */
.nutrition-facts-footer {
    font-size: 10px;
    margin-top: 10px;
}

.nutrition-facts-disclaimer {
    margin: 5px 0;
}

.nutrition-facts-notes {
    margin-top: 10px;
    font-style: italic;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .nutrition-facts-label {
        width: 100%;
        margin: 15px 0;
        font-size: 13px;
    }
    
    .nutrition-facts-title {
        font-size: 24px;
    }
    
    .nutrition-facts-calories-label,
    .nutrition-facts-calories-value {
        font-size: 20px;
    }
    
    .nutrition-facts-item {
        padding: 2px 0;
    }
}

@media (max-width: 375px) {
    .nutrition-facts-label {
        padding: 10px;
        font-size: 12px;
    }
    
    .nutrition-facts-title {
        font-size: 22px;
    }
    
    .nutrition-facts-serving-size-line {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Print styles for nutrition facts */
@media print {
    .nutrition-facts-label {
        box-shadow: none;
        border: 1px solid #000;
        max-width: 300px;
        width: 100%;
        page-break-inside: avoid;
    }
}

/* WooCommerce tab content adjustments */
.woocommerce-Tabs-panel--nutrition_facts {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
}

.woocommerce div.product .woocommerce-tabs .panel.woocommerce-Tabs-panel--nutrition_facts {
    margin-bottom: 30px;
}
