/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 *
 * @package    Nutrition_Calculator
 * @subpackage Nutrition_Calculator/public/css
 */

/* Calculator Container */
.snc-calculator {
    max-width: 1200px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #333;
}

/* Section Headers */
.snc-section-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-size: 1.5em;
}

/* Selection Container */
.snc-selection-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 30px;
}

.snc-selection-column {
    flex: 1 1 300px;
}

/* Categories List */
.snc-categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.snc-category-item {
    padding: 12px;
    margin-bottom: 10px;
    background: #f9f9f9;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.snc-category-item:hover {
    background: #f0f0f0;
}

.snc-category-item.active {
    background: #006341;
    /* Starbucks green */
    color: white;
}

.snc-category-item img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 50%;
    margin-right: 10px;
    vertical-align: middle;
}

/* Subcategories List */
.snc-subcategories-list {
    list-style: none;
    padding: 0;
    margin: 0;
    animation: fade-in 0.5s;
}

.snc-subcategory-item {
    padding: 10px;
    margin-bottom: 8px;
    background: #f5f5f5;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.snc-subcategory-item:hover {
    background: #eaeaea;
}

.snc-subcategory-item.active {
    background: #1e3932;
    /* Starbucks dark green */
    color: white;
}

.snc-subcategory-item img {
    width: 30px;
    height: 30px;
    object-fit: cover;
    border-radius: 50%;
    margin-right: 10px;
    vertical-align: middle;
}

/* Products List */
.snc-products-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    animation: fade-in 0.5s;

}

.snc-product-item {
    border: 1px solid #eee;
    border-radius: 5px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.snc-product-item:hover {
    border-color: #ccc;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.snc-product-item.active {
    border-color: #006341;
    box-shadow: 0 0 0 2px #006341;
}

.snc-product-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
    margin: 0 auto 10px auto;
}

.snc-product-name {
    font-weight: 600;
    margin-bottom: 5px;
}
.snc-product-details{
    animation: fade-in 0.5s;
}

/* Sizes Selection */
.snc-sizes-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    animation: fade-in 0.5s;
}

.snc-size-item {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 8px 15px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.snc-size-item:hover {
    background: #f5f5f5;
}

.snc-size-item.active {
    background: #006341;
    color: white;
    border-color: #006341;
}

/* Customization Section */
.snc-customization-section {
    margin-bottom: 25px;
    animation: fade-in 0.5s;
}

.snc-customization-type {
    margin-bottom: 15px;
}

.snc-customization-type-name {
    font-weight: 600;
    margin-bottom: 8px;
}

.snc-customization-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.snc-customization-option {
    border: 1px solid #ddd;
    border-radius: 30px;
    padding: 5px 12px;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.snc-customization-option:hover {
    background: #f5f5f5;
}

.snc-customization-option.active {
    background: #006341;
    color: white;
    border-color: #006341;
}

/* Order Summary */
.snc-order-summary {
    background: #f9f9f9;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 30px;
}

.snc-order-title {
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 15px;
}

.snc-order-details {
    margin-bottom: 15px;
}

.snc-order-product {
    font-weight: 600;
}

.snc-order-size,
.snc-order-customizations {
    margin-top: 5px;
    color: #666;
}

/* Nutrition Information */
.snc-nutrition-info {
    background: white;
    border: 1px solid #eee;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 30px;
    animation:fade-in 0.5s;
}

.snc-nutrition-title {
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 15px;
}

.snc-nutrition-table {
    width: 100%;
    max-width: unset !important;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.snc-nutrition-table th {
    text-align: left;
    padding: 8px;
    border-bottom: 2px solid #000000 !important;
    font-weight: 600;
}

.snc-nutrition-table td {
    padding: 8px;
    border-bottom: 1px solid #000000 !important;
}

.snc-nutrition-table tr:last-child td {
    border-bottom: none;
}

.snc-nutrition-name {
    width: 60%;
}

.snc-nutrition-value {
    width: 20%;
    text-align: right;
}

.snc-nutrition-percent {
    width: 20%;
    text-align: right;
}

/* Visualization */
.snc-visualization {
    margin-bottom: 30px;
}

.snc-chart-container {
    height: 300px;
    position: relative;
}

/* Empty States */
.snc-empty-state {
    text-align: center;
    padding: 30px;
    color: #666;
}

.snc-empty-state-icon {
    font-size: 3em;
    margin-bottom: 15px;
    color: #ddd;
}

.snc-empty-state-text {
    font-size: 1.1em;
}

/* Loading States */
.snc-loading {
    text-align: center;
    padding: 30px;
}

.snc-loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #006341;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: snc-spin 2s linear infinite;
    margin: 0 auto 15px auto;
}

.snc-dosage-control {
    display: flex;
    max-width: 250px;
    gap: 20px;
    margin: 10px 0;
}

button {
    background-color: #006341;
}

button:hover,
button:focus {
    background-color: #005a3d;
}

.snc-dosage-increase,
.snc-dosage-decrease {
    border-radius: 20px;
    font-size: 18px;
    padding: 10px 20px;
}

.snc-customization-list li {
    list-style-type: none;
    margin: 10px 0;
}

.snc-order-reciept {
    background-color: #ffffff;
    border-radius: 10px;
    padding: 20px;
    animation: fade-in 0.5s;
}

.snc-customization-list li .snc-delete-customization {
    margin: 0 10px;
}

table {
    border-radius: 10px;
}

table,
th,
td {
    border: 1px solid black;
    border-collapse: collapse;

}

.total-cal {
    position: fixed;
    top: 26%;
    right: 20px;
    background: #005a3d;
    padding: 10px;
    border-radius: 20px;
    border: 2px solid white;
    box-shadow: -5px 5px 11px #0000006b;
    color: #ffff;
    animation: fade-in 0.5s;
}

@keyframes fade-in {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@keyframes snc-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Responsive Styles */
@media (max-width: 768px) {
    .snc-selection-container {
        flex-direction: column;
        gap: 20px;
    }

    .snc-products-list {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .snc-product-image {
        width: 80px;
        height: 80px;
    }
}

@media (max-width: 480px) {
    .snc-products-list {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .snc-product-image {
        width: 70px;
        height: 70px;
    }

    .snc-nutrition-table th,
    .snc-nutrition-table td {
        padding: 5px;
        font-size: 0.9em;
    }
}