/* Base styles for the dinner ideas plugin */
.dinner-ideas-container {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Dinner selection styles */
.dinner-selection-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.dinner-item {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dinner-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.dinner-day {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    padding: 16px 20px;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 0.025em;
}

.dinner-selection {
    padding: 24px;
}

.dinner-select {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: white;
}

.dinner-select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.ingredients-list {
    background: #f8fafc;
    padding: 16px;
    margin: 16px 0;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    border-left: 4px solid #6366f1;
}

.ingredient-item {
    margin-bottom: 8px;
    color: #64748b;
    font-size: 14px;
}

.dinner-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.dinner-actions button {
    flex: 1;
    padding: 12px 16px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    color: #475569;
}

.dinner-actions button:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
}

/* Shopping list styles */
.dinner-summary {
    margin-top: 40px;
    padding: 32px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#generate-shopping-list {
    padding: 16px 32px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

#generate-shopping-list:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

#generate-shopping-list:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#shopping-list {
    margin-top: 32px;
    padding: 32px;
    background: #fefefe;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
}

#print-shopping-list {
    margin-top: 24px;
    padding: 12px 24px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

#print-shopping-list:hover {
    background: #059669;
    transform: translateY(-1px);
}

/* Updated categorized shopping list styles */
.shopping-list-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.shopping-category {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
}

.shopping-category:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.shopping-category h3 {
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: 0.025em;
}

.shopping-category ul {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
}

.shopping-category .shopping-item {
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
    color: #475569;
    font-size: 14px;
    transition: color 0.2s ease;
}

.shopping-category .shopping-item:hover {
    color: #1e293b;
}

/* Updated dinner summary header */
.dinner-summary-header {
    grid-column: 1 / -1;
    margin-bottom: 32px;
    text-align: center;
    padding: 24px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 16px;
}

.dinner-summary-header h4 {
    margin-bottom: 16px;
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
}

.dinner-summary-header ul {
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    list-style-type: none;
    gap: 12px;
}

.dinner-summary-header li {
    padding: 8px 16px;
    background: white;
    border-radius: 24px;
    border: 1px solid #e5e7eb;
    font-size: 14px;
    font-weight: 500;
    color: #475569;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.dinner-summary-header li:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Compact dinner view styles */
.dinner-item.dinner-confirmed .dinner-day,
.dinner-item.dinner-confirmed .dinner-selection,
.dinner-item.dinner-confirmed .dinner-actions {
    display: none;
}

.compact-view {
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.compact-view:hover {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
}

.compact-day {
    font-weight: 600;
    color: #1e293b;
}

.compact-dinner {
    font-style: italic;
    color: #6366f1;
    font-weight: 500;
}

.compact-view:after {
    content: "⟳";
    margin-left: 12px;
    font-size: 16px;
    color: #64748b;
    transition: transform 0.2s ease;
}

.compact-view:hover:after {
    transform: rotate(90deg);
}

/* Reset/Refresh button styles */
.dinner-controls {
    text-align: center;
    margin: 32px 0;
    padding: 24px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.reset-dinners-button {
    padding: 16px 32px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
}

.reset-dinners-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4);
}

.reset-dinners-button:active {
    transform: translateY(0);
}

/* Search interface styles */
.additional-food-search {
    margin-bottom: 24px;
}

.additional-food-search-input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 16px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
    background: white;
}

.additional-food-search-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.search-results-dropdown {
    position: relative;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.search-results-dropdown.show {
    display: block;
}

.search-result-item {
    padding: 16px 20px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.search-result-item:hover {
    background: #f8fafc;
}

.search-result-name {
    font-weight: 600;
    color: #1e293b;
}

.search-result-category {
    font-size: 12px;
    color: #6366f1;
    background: #ede9fe;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.browse-button {
    padding: 12px 20px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    color: #475569;
}

.browse-button:hover {
    border-color: #6366f1;
    color: #6366f1;
    transform: translateY(-1px);
}

.selected-search-items {
    margin: 24px 0;
    padding: 20px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: #f8fafc;
}

.selected-search-items.has-items {
    border-color: #6366f1;
    background: #f0f4ff;
}

.selected-search-items h4 {
    margin: 0 0 16px 0;
    font-weight: 600;
    color: #1e293b;
}

.selected-search-items li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 8px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.quantity-controls button {
    width: 32px;
    height: 32px;
    border: 1px solid #e5e7eb;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    color: #475569;
}

.quantity-controls button:hover {
    background: #f1f5f9;
    border-color: #6366f1;
    color: #6366f1;
}

.quantity-controls .quantity-input {
    width: 60px !important;
    height: 32px;
    text-align: center;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 14px;
    font-weight: 500;
    background: white;
    margin: 0;
    box-sizing: border-box;
}

.quantity-controls .remove-search-item {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
    margin-left: 12px;
}

.quantity-controls .remove-search-item:hover {
    background: #dc2626;
    border-color: #dc2626;
}

/* Ingredient category sections */
.ingredient-category-section {
    margin-bottom: 24px;
    padding: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fefefe;
}

.ingredient-category-section .category-title {
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5e7eb;
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
}

.ingredient-selection-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 8px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    min-height: 48px;
    transition: all 0.2s ease;
}

.ingredient-selection-item:hover {
    background: #f8fafc;
    border-color: #6366f1;
}

.ingredient-checkbox {
    margin-right: 12px;
    transform: scale(1.1);
}

.ingredient-label {
    font-weight: 500;
    cursor: pointer;
    margin: 0;
    color: #1e293b;
}

/* Custom extras styling */
.custom-extras-category {
    margin-top: 24px;
}

.custom-extras-input {
    width: 100%;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 16px;
    font-family: inherit;
    margin-top: 12px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.custom-extras-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.custom-extras-category .description {
    font-size: 12px;
    font-style: italic;
    margin: 8px 0;
    color: #64748b;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .dinner-ideas-container {
        padding: 20px 16px;
    }
    
    .dinner-selection-container {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .shopping-list-categories {
        grid-template-columns: 1fr;
    }
    
    .dinner-summary-header ul {
        flex-direction: column;
        align-items: center;
    }
    
    .reset-dinners-button {
        width: 100%;
        padding: 18px;
    }
}

/* Print styles */
@media print {
    body * {
        visibility: hidden;
    }
    
    .print-container, .print-container * {
        visibility: visible;
    }
    
    .print-container {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
    
    .shopping-category {
        break-inside: avoid;
        page-break-inside: avoid;
        padding: 8px 12px;
        margin-bottom: 12px;
        border: 1px solid #ccc;
    }
    
    .shopping-category h3 {
        font-size: 16px;
        margin: 8px 0;
    }
    
    .shopping-item {
        font-size: 12px;
        padding: 4px 0;
    }
}