/* Dunkin' Calculator Styles */
.dunkin-calculator-container {
    max-width: 1200px;
    margin: 0 auto;
    font-family: Arial, sans-serif;
    background: #f9f9f9;
    padding: 20px;
}

/* Hero Section */
.dunkin-hero {
    background: linear-gradient(135deg, #ff6900, #d4006b);
    color: white;
    text-align: center;
    padding: 60px 20px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.dunkin-hero h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
    font-weight: bold;
}

.dunkin-hero p {
    font-size: 1.2em;
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Category Selection */
.dunkin-category-section {
    background: white;
    padding: 40px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.dunkin-category-section h2 {
    text-align: center;
    font-size: 2.2em;
    margin-bottom: 30px;
    color: #333;
}

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

.category-item {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-item:hover, .category-item.active {
    border-color: #ff6900;
    box-shadow: 0 4px 15px rgba(255, 105, 0, 0.2);
}

.category-item img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    margin-bottom: 15px;
}

.category-item h3 {
    margin: 0;
    font-size: 1.1em;
    color: #333;
}

/* Calculator Interface */
.calculator-interface {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.calculator-left {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.calculator-section {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.calculator-section h3 {
    margin: 0 0 15px 0;
    font-size: 1.3em;
    color: #333;
}

.calculator-select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    background: white;
    transition: border-color 0.3s ease;
}

.calculator-select:focus {
    outline: none;
    border-color: #ff6900;
    box-shadow: 0 0 0 3px rgba(255, 105, 0, 0.1);
}

/* Size Buttons */
.size-buttons {
    display: flex;
    gap: 10px;
}

.size-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.size-btn:hover, .size-btn.active {
    background: #ff6900;
    color: white;
    border-color: #ff6900;
}

/* Add Buttons */
.add-button {
    background: none;
    border: none;
    color: #ff6900;
    cursor: pointer;
    margin-top: 10px;
    font-size: 0.9em;
    text-decoration: underline;
}

.add-button:hover {
    color: #d4006b;
}

/* Quantity Controls */
.addon-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-controls button {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-controls button:hover {
    background: #f0f0f0;
}

/* Addon Checkboxes */
.addon-checkboxes {
    margin-top: 15px;
}

.addon-checkboxes label {
    display: block;
    margin: 8px 0;
    cursor: pointer;
}

.addon-checkboxes input[type="checkbox"] {
    margin-right: 8px;
}

/* Meal Builder */
.meal-button {
    width: 100%;
    padding: 12px;
    margin: 5px 0;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.meal-button:first-of-type {
    background: #d4006b;
    color: white;
}

.meal-button:nth-of-type(2) {
    background: #28a745;
    color: white;
}

.meal-button.clear {
    background: #6c757d;
    color: white;
}

.meal-button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Nutrition Facts */
.calculator-right {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.nutrition-facts {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

.nutrition-header {
    background: #ff6900;
    color: white;
    text-align: center;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.nutrition-header h3 {
    margin: 0;
    font-size: 1.2em;
}

.nutrition-header p {
    margin: 5px 0 0 0;
    font-size: 0.9em;
    opacity: 0.9;
}

.nutrition-calories {
    text-align: center;
    margin-bottom: 20px;
}

.calories-number {
    font-size: 3em;
    font-weight: bold;
    color: #ff6900;
    line-height: 1;
}

.calories-label {
    color: #666;
    margin-bottom: 15px;
}

.caffeine-info {
    font-size: 0.9em;
    color: #666;
}

/* Daily Goal */
.daily-goal {
    margin-bottom: 20px;
}

.goal-text {
    display: flex;
    justify-content: space-between;
    font-size: 0.9em;
    color: #666;
    margin-bottom: 8px;
}

.goal-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.goal-progress {
    height: 100%;
    background: #28a745;
    transition: width 0.3s ease;
    width: 0%;
}

/* Nutrition Details */
.nutrition-details {
    margin-bottom: 25px;
}

.nutrition-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.nutrition-row:last-child {
    border-bottom: none;
}

/* Share Section */
.share-section {
    border-top: 1px solid #f0f0f0;
    padding-top: 20px;
}

.share-button {
    width: 100%;
    background: #ff6900;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    margin-bottom: 15px;
    transition: background 0.3s ease;
}

.share-button:hover {
    background: #e55a00;
}

.share-options {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 5px;
}

.share-options button {
    padding: 10px 5px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8em;
    text-align: center;
}

.share-options button:hover {
    background: #f8f9fa;
}

/* How to Use Section */
.how-to-use {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.how-to-use h2 {
    text-align: center;
    font-size: 2em;
    margin-bottom: 20px;
    color: #333;
}

.how-to-use > p {
    text-align: center;
    font-size: 1.1em;
    color: #666;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.step {
    text-align: left;
}

.step-number {
    width: 40px;
    height: 40px;
    background: #ff6900;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 15px;
}

.step h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 1.1em;
}

.step p {
    margin: 0;
    color: #666;
    line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .calculator-interface {
        grid-template-columns: 1fr;
    }
    
    .calculator-right {
        position: static;
    }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .steps-grid {
        grid-template-columns: 1fr;
    }
    
    .share-options {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .size-buttons {
        flex-wrap: wrap;
    }
    
    .dunkin-hero h1 {
        font-size: 2em;
    }
    
    .dunkin-hero p {
        font-size: 1em;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ff6900;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Additional Item Styles */
.modifier-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin: 10px 0;
    background: #fafafa;
}

.modifier-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.modifier-select {
    min-width: 150px;
}

.remove-btn {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 0.8em;
}

.remove-btn:hover {
    background: #c82333;
}

/* Meal Items Display */
#meal-items {
    margin: 15px 0;
    min-height: 40px;
}

.meal-item {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    margin: 5px 0;
    font-size: 0.9em;
    color: #666;
}

/* Toast/Alert Styles */
.alert {
    padding: 12px 16px;
    border-radius: 4px;
    margin: 10px 0;
    position: relative;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #cce7ff;
    color: #004085;
    border: 1px solid #99d3ff;
}