/* Chipotle Nutrition Calculator - Standalone CSS */

.chipotle-calc-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    position: relative;
}

.chipotle-calc-dark {
    background: #1a1a1a;
    color: #ffffff;
}

/* Header */
.calc-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #dc2626;
}

.calc-title {
    font-size: 28px;
    font-weight: bold;
    color: #dc2626;
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.calc-icon {
    font-size: 32px;
}

.calc-subtitle {
    color: #666;
    margin: 0;
    font-size: 16px;
}

.chipotle-calc-dark .calc-subtitle {
    color: #ccc;
}

/* Tabs */
.calc-tabs {
    display: flex;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 30px;
    gap: 4px;
}

.chipotle-calc-dark .calc-tabs {
    background: #2a2a2a;
}

.calc-tab {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    color: #666;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.calc-tab:hover {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
}

.calc-tab.active {
    background: #dc2626;
    color: white;
}

.tab-icon {
    font-size: 16px;
}

/* Content */
.calc-content {
    min-height: 400px;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Sections */
.calc-section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chipotle-calc-dark .section-title {
    color: #ffffff;
}

.section-description {
    color: #666;
    margin: 0 0 20px 0;
    font-size: 14px;
}

.chipotle-calc-dark .section-description {
    color: #ccc;
}

/* Entree Grid */
.entree-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.entree-option {
    padding: 20px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
}

.chipotle-calc-dark .entree-option {
    background: #2a2a2a;
    border-color: #404040;
}

.entree-option:hover {
    border-color: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.15);
}

.entree-option.selected {
    border-color: #dc2626;
    background: #fef2f2;
}

.chipotle-calc-dark .entree-option.selected {
    background: #3a1a1a;
}

.entree-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.entree-option h4 {
    margin: 0 0 5px 0;
    font-size: 18px;
    color: #333;
}

.chipotle-calc-dark .entree-option h4 {
    color: #ffffff;
}

.entree-option p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.chipotle-calc-dark .entree-option p {
    color: #ccc;
}

/* Ingredient Grids */
.ingredient-category {
    margin-bottom: 30px;
}

.ingredient-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
}

.ingredient-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
}

.chipotle-calc-dark .ingredient-item {
    background: #2a2a2a;
    border-color: #404040;
}

.ingredient-item:hover {
    border-color: #dc2626;
    background: #fef2f2;
}

.chipotle-calc-dark .ingredient-item:hover {
    background: #3a1a1a;
}

.ingredient-item.selected {
    border-color: #dc2626;
    background: #fef2f2;
}

.chipotle-calc-dark .ingredient-item.selected {
    background: #3a1a1a;
}

.ingredient-info {
    flex: 1;
}

.ingredient-name {
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}

.chipotle-calc-dark .ingredient-name {
    color: #ffffff;
}

.ingredient-nutrition {
    font-size: 12px;
    color: #666;
}

.chipotle-calc-dark .ingredient-nutrition {
    color: #ccc;
}

.ingredient-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #dc2626;
    background: transparent;
    color: #dc2626;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: all 0.2s ease;
}

.quantity-btn:hover {
    background: #dc2626;
    color: white;
}

.quantity-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quantity-display {
    min-width: 20px;
    text-align: center;
    font-weight: 500;
    color: #333;
}

.chipotle-calc-dark .quantity-display {
    color: #ffffff;
}

/* Nutrition Summary */
.nutrition-summary {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin-top: 30px;
}

.chipotle-calc-dark .nutrition-summary {
    background: #2a2a2a;
}

.nutrition-display {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 30px;
    align-items: center;
    margin-bottom: 25px;
}

.nutrition-main {
    display: flex;
    align-items: center;
    gap: 40px;
}

.calories-display {
    text-align: center;
}

.calories-number {
    display: block;
    font-size: 36px;
    font-weight: bold;
    color: #dc2626;
    line-height: 1;
}

.calories-label {
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.chipotle-calc-dark .calories-label {
    color: #ccc;
}

.macros-display {
    display: flex;
    gap: 30px;
}

.macro {
    text-align: center;
}

.macro-value {
    display: block;
    font-size: 20px;
    font-weight: 600;
    color: #333;
    line-height: 1;
}

.chipotle-calc-dark .macro-value {
    color: #ffffff;
}

.macro-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.chipotle-calc-dark .macro-label {
    color: #ccc;
}

.price-estimate {
    text-align: right;
    padding: 15px;
    background: #e7f5e7;
    border-radius: 8px;
    border-left: 4px solid #22c55e;
}

.chipotle-calc-dark .price-estimate {
    background: #1a3a1a;
}

.price-label {
    display: block;
    font-size: 12px;
    color: #166534;
    margin-bottom: 4px;
}

.chipotle-calc-dark .price-label {
    color: #86efac;
}

.price-value {
    font-size: 18px;
    font-weight: bold;
    color: #22c55e;
}

/* Buttons */
.calc-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 14px;
}

.btn-primary {
    background: #dc2626;
    color: white;
}

.btn-primary:hover {
    background: #b91c1c;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.chipotle-calc-dark .btn-secondary {
    background: #374151;
    color: #f3f4f6;
    border-color: #4b5563;
}

.btn-secondary:hover {
    background: #e5e7eb;
    transform: translateY(-1px);
}

.chipotle-calc-dark .btn-secondary:hover {
    background: #4b5563;
}

.btn-icon {
    font-size: 16px;
}

/* Location Grid */
.location-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

.location-item {
    padding: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
}

.chipotle-calc-dark .location-item {
    background: #2a2a2a;
    border-color: #404040;
}

.location-item:hover {
    border-color: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.15);
}

.location-item.selected {
    border-color: #dc2626;
    background: #fef2f2;
}

.chipotle-calc-dark .location-item.selected {
    background: #3a1a1a;
}

.location-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.chipotle-calc-dark .location-name {
    color: #ffffff;
}

.location-multiplier {
    font-size: 14px;
    color: #666;
}

.chipotle-calc-dark .location-multiplier {
    color: #ccc;
}

/* Comparison */
.comparison-controls {
    margin-bottom: 25px;
    display: flex;
    gap: 12px;
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.comparison-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #666;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px dashed #d1d5db;
}

.chipotle-calc-dark .comparison-empty {
    background: #2a2a2a;
    color: #ccc;
    border-color: #404040;
}

.comparison-meal {
    padding: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    position: relative;
}

.chipotle-calc-dark .comparison-meal {
    background: #2a2a2a;
    border-color: #404040;
}

.comparison-meal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.comparison-meal-name {
    font-weight: 600;
    color: #333;
}

.chipotle-calc-dark .comparison-meal-name {
    color: #ffffff;
}

.comparison-remove {
    background: #ef4444;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.comparison-nutrition {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    text-align: center;
}

.comparison-stat {
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
}

.chipotle-calc-dark .comparison-stat {
    background: #374151;
}

.comparison-stat-value {
    display: block;
    font-size: 18px;
    font-weight: bold;
    color: #dc2626;
}

.comparison-stat-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.chipotle-calc-dark .comparison-stat-label {
    color: #ccc;
}

/* Loading */
.calc-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.chipotle-calc-dark .calc-loading {
    background: rgba(26, 26, 26, 0.9);
}

.loading-spinner {
    font-size: 48px;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .chipotle-calc-container {
        margin: 10px;
        padding: 15px;
    }
    
    .calc-tabs {
        flex-direction: column;
        gap: 2px;
    }
    
    .calc-tab {
        padding: 15px;
    }
    
    .entree-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 10px;
    }
    
    .ingredient-grid {
        grid-template-columns: 1fr;
    }
    
    .nutrition-display {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .nutrition-main {
        flex-direction: column;
        gap: 20px;
    }
    
    .macros-display {
        justify-content: center;
    }
    
    .calc-actions {
        flex-direction: column;
    }
    
    .comparison-controls {
        flex-direction: column;
    }
    
    .comparison-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .chipotle-calc-container {
        margin: 5px;
        padding: 10px;
        border-radius: 8px;
    }
    
    .calc-title {
        font-size: 24px;
    }
    
    .calc-icon {
        font-size: 28px;
    }
    
    .entree-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .macros-display {
        gap: 15px;
    }
}