/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8fafc;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.nav {
    display: flex;
    gap: 0.5rem;
}

.nav button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.nav button:hover {
    background: rgba(255, 255, 255, 0.3);
}

.nav button.active {
    background: rgba(255, 255, 255, 0.9);
    color: #6366f1;
}

/* Main content */
.main {
    padding: 2rem 0;
    min-height: calc(100vh - 80px);
}

.view {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.view h2 {
    margin-bottom: 2rem;
    font-size: 2rem;
    color: #1e293b;
}

/* Dashboard styles */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    text-align: center;
    border: 1px solid #e2e8f0;
}

.stat-card h3 {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: #6366f1;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #64748b;
    font-size: 0.9rem;
}

.quick-actions h3 {
    margin-bottom: 1rem;
    color: #1e293b;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #6366f1;
    color: white;
}

.btn-primary:hover {
    background: #4f46e5;
    transform: translateY(-1px);
}

.btn-secondary {
    background: white;
    color: #6366f1;
    border: 2px solid #6366f1;
}

.btn-secondary:hover {
    background: #6366f1;
    color: white;
    transform: translateY(-1px);
}

/* Week planner */
.week-view {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.day-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.day-card h3 {
    color: #1e293b;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    text-align: center;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f1f5f9;
}

.meals {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.meal-slot label {
    display: block;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.meal-input input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.meal-input input:focus {
    outline: none;
    border-color: #6366f1;
}

.meal-input input::placeholder {
    color: #94a3b8;
}

/* Recipes */
.recipes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
}

.search-bar {
    flex: 1;
    max-width: 400px;
}

.search-bar input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
}

.search-bar input:focus {
    outline: none;
    border-color: #6366f1;
}

.recipes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.recipe-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.recipe-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.recipe-image {
    height: 120px;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.recipe-emoji {
    font-size: 3rem;
}

.recipe-info {
    padding: 1.5rem;
}

.recipe-info h3 {
    margin-bottom: 0.5rem;
    color: #1e293b;
    font-size: 1.1rem;
}

.recipe-info p {
    color: #64748b;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.recipe-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: #64748b;
}

.recipe-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav {
        width: 100%;
        justify-content: center;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .week-view {
        grid-template-columns: 1fr;
    }

    .recipes-header {
        flex-direction: column;
        align-items: stretch;
    }

    .action-buttons {
        justify-content: center;
    }

    .recipes-grid {
        grid-template-columns: 1fr;
    }
}

/* Meals View Styles */
.meals-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
}

.add-meal-section {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.add-meal-input {
    flex: 1;
    min-width: 300px;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.add-meal-input:focus {
    outline: none;
    border-color: #6366f1;
}

.complexity-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.complexity-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    white-space: nowrap;
}

.complexity-options {
    display: flex;
    gap: 0.75rem;
}

.complexity-radio {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: #374151;
}

.complexity-radio input[type="radio"] {
    margin: 0;
    width: 16px;
    height: 16px;
    accent-color: #6366f1;
}

.complexity-radio span {
    user-select: none;
}

.success-message {
    background: #dcfce7;
    color: #166534;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    border: 1px solid #bbf7d0;
    margin-bottom: 1.5rem;
    font-weight: 500;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-section {
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.search-input {
    flex: 1;
    max-width: 400px;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: #6366f1;
}

.complexity-filter {
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 1rem;
    background-color: white;
    transition: border-color 0.2s;
    min-width: 180px;
}

.complexity-filter:focus {
    outline: none;
    border-color: #6366f1;
}

.meals-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.meal-item {
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.meal-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.meal-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.meal-display:hover {
    background-color: #f8fafc;
}

.meal-content {
    flex: 1;
}

.meal-title {
    font-size: 1rem;
    color: #1e293b;
    font-weight: 500;
    display: block;
    margin-bottom: 0.25rem;
}

.meal-classifications-text {
    font-size: 0.75rem;
    color: #6b7280;
    line-height: 1.3;
    font-style: normal;
}

.meal-classifications-text span {
    display: inline;
}

.complexity-indicator {
    font-style: italic;
    text-transform: capitalize;
    font-size: 0.75rem;
}

.classifying-indicator {
    font-size: 0.75rem;
    color: #6b7280;
    font-style: normal;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.temp-indicator {
    font-size: 0.75rem;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-weight: 500;
    text-transform: capitalize;
}

.temp-indicator[data-temp="warm"] {
    background-color: #fee2e2;
    color: #dc2626;
}

.temp-indicator[data-temp="cold"] {
    background-color: #dbeafe;
    color: #2563eb;
}

.meal-edit {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background-color: #f8fafc;
    flex-wrap: wrap;
}

.meal-edit-input {
    flex: 1;
    min-width: 200px;
    padding: 0.5rem;
    border: 2px solid #6366f1;
    border-radius: 4px;
    font-size: 1rem;
    background: white;
}

.meal-edit-input:focus {
    outline: none;
    border-color: #4f46e5;
}

.meal-edit .complexity-selector {
    flex-shrink: 0;
}

.meal-edit .complexity-selector .complexity-label {
    font-size: 0.75rem;
}

.meal-edit .complexity-selector .complexity-radio {
    font-size: 0.75rem;
}

.meal-edit .complexity-selector .complexity-radio input[type="radio"] {
    width: 14px;
    height: 14px;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.meal-actions-buttons {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.delete-btn, .reclassify-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.delete-btn {
    color: #dc2626;
    font-size: 1.25rem;
}

.delete-btn:hover {
    background-color: #fee2e2;
}

.reclassify-btn {
    color: #6b7280;
    font-size: 0.875rem;
}

.reclassify-btn:hover {
    background-color: #f3f4f6;
    color: #374151;
}

.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #6b7280;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

/* Import Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e2e8f0;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #1e293b;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.close-btn:hover {
    background-color: #f3f4f6;
}

.modal-content {
    padding: 1.5rem 2rem;
    flex: 1;
    overflow-y: auto;
}

.import-info {
    margin-bottom: 1rem;
    font-weight: 500;
    color: #374151;
}

.import-preview {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 1rem;
    background: #f8fafc;
    margin-bottom: 1rem;
}

.import-meal-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e2e8f0;
    color: #374151;
}

.import-meal-item:last-child {
    border-bottom: none;
}

.duplicate-warning {
    background: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: 6px;
    padding: 1rem;
    margin-top: 1rem;
}

.duplicate-warning p {
    margin: 0 0 0.5rem 0;
    color: #92400e;
}

.duplicate-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.duplicate-item {
    background: #fcd34d;
    color: #92400e;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding: 1rem 2rem;
    border-top: 1px solid #e2e8f0;
}

/* Import Progress Styles */
.import-progress {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background-color: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    margin: 0.5rem 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    transition: width 0.3s ease;
    border-radius: 10px;
}

.progress-text {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0.5rem 0 0 0;
    text-align: center;
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .main {
        padding: 1rem 0;
    }
    
    .view h2 {
        font-size: 1.5rem;
    }
    
    .day-card {
        padding: 1rem;
    }

    .search-section {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .search-input {
        max-width: none;
    }

    .complexity-filter {
        min-width: auto;
    }

    .add-meal-section {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .add-meal-input {
        min-width: auto;
    }

    .complexity-selector {
        justify-content: center;
    }

    .complexity-options {
        gap: 0.5rem;
    }

    .meal-edit {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .meal-edit-input {
        min-width: auto;
    }

    .search-input {
        max-width: none;
    }

    .modal {
        margin: 1rem;
        max-height: calc(100vh - 2rem);
    }

    .modal-content {
        padding: 1rem;
    }

    .modal-actions {
        flex-direction: column;
        padding: 1rem;
    }

    .import-preview {
        max-height: 200px;
    }

}

/* Planner Styles */
.planner-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
}

.week-navigation {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.current-week {
    font-weight: 600;
    color: #1e293b;
    min-width: 200px;
    text-align: center;
}

.planning-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.weekly-table-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.weekly-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.weekly-table th {
    width: 14.28%; /* 100% / 7 days */
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    padding: 1rem 0.5rem;
    text-align: center;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.weekly-table th:last-child {
    border-right: none;
}

.day-info {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.day-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.day-date {
    font-size: 0.875rem;
    opacity: 0.9;
}

.day-cell {
    padding: 1rem 0.5rem;
    vertical-align: top;
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.day-cell:last-child {
    border-right: none;
}

.notes-row .day-cell {
    background: #f8fafc;
}

.day-notes {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.75rem;
    font-family: inherit;
    line-height: 1.4;
    background: white;
    resize: vertical;
    min-height: 60px;
}

.day-notes:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.day-notes::placeholder {
    color: #9ca3af;
}

.meal-cell {
    min-height: 200px;
    position: relative;
}

.planned-meal {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    min-height: 160px;
    cursor: grab;
    transition: all 0.2s ease;
    user-select: none;
}

.meal-info h5 {
    margin: 0 0 0.5rem 0;
    color: #1e293b;
    font-size: 0.875rem;
    line-height: 1.3;
    font-weight: 600;
}

.meal-classifications {
    margin-bottom: 0.5rem;
}

.classification-text {
    display: block;
    font-size: 0.625rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.complexity-text {
    display: block;
    font-size: 0.625rem;
    color: #6b7280;
    text-transform: capitalize;
    font-style: italic;
    text-align: center;
}

.temp-text {
    display: block;
    font-size: 0.625rem;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-weight: 500;
    text-transform: capitalize;
    text-align: center;
    margin: 0.25rem 0;
}

.temp-text[data-temp="warm"] {
    background-color: #fee2e2;
    color: #dc2626;
}

.temp-text[data-temp="cold"] {
    background-color: #dbeafe;
    color: #2563eb;
}

.meal-actions {
    display: flex;
    justify-content: flex-start;
    margin-top: auto;
    padding-right: 40px; /* Make room for drag handle */
}

.meal-actions .btn {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

.empty-meal {
    text-align: center;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #6b7280;
}

.empty-meal p {
    margin: 0 0 0.75rem 0;
    font-style: italic;
    font-size: 0.875rem;
}

.empty-meal .btn {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
}

/* Drag and Drop Styles */
.planned-meal.dragging {
    opacity: 0.5;
    cursor: grabbing;
    transform: scale(0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.planned-meal.dragging .meal-actions {
    pointer-events: none;
}

.drag-handle {
    position: absolute;
    bottom: 5px;
    right: 5px;
    font-size: 16px;
    color: #9ca3af;
    cursor: grab;
    line-height: 1;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    padding: 4px 6px;
    border-radius: 3px;
    transition: all 0.2s;
    background-color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.drag-handle:hover {
    color: #6b7280;
    background-color: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.2);
    transform: scale(1.05);
}

.drag-handle:active,
.drag-handle.dragging {
    cursor: grabbing;
    background-color: rgba(99, 102, 241, 0.1);
    color: #6366f1;
    border-color: #6366f1;
}

.planned-meal {
    position: relative;
}

.planned-meal.dragging {
    opacity: 0.7;
}

.meal-cell.drag-over {
    background-color: #f0f9ff;
    border: 2px dashed #3b82f6;
    border-radius: 8px;
    animation: dragPulse 1s ease-in-out infinite alternate;
}

.empty-meal.drag-over {
    background-color: #f0f9ff;
    border: 2px dashed #3b82f6;
    border-radius: 8px;
    color: #3b82f6;
}

.drop-hint {
    font-size: 0.8rem !important;
    color: #3b82f6 !important;
    font-weight: 600 !important;
    font-style: normal !important;
    margin: 0.5rem 0 0 0 !important;
    animation: fadeInBounce 0.3s ease-out;
}

@keyframes dragPulse {
    0% {
        background-color: #f0f9ff;
        border-color: #3b82f6;
    }
    100% {
        background-color: #e0f2fe;
        border-color: #0ea5e9;
    }
}

@keyframes fadeInBounce {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    50% {
        opacity: 0.8;
        transform: translateY(2px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Replacement Modal Styles */
.replacement-reasons {
    margin-bottom: 1.5rem;
}

.replacement-reasons p {
    margin-bottom: 1rem;
    font-weight: 500;
    color: #374151;
}

.reason-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.replacement-options h4 {
    margin-bottom: 1rem;
    color: #1e293b;
}

.meal-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
}

.meal-option {
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
}

.meal-option:hover {
    border-color: #6366f1;
    background: #f8fafc;
}

.meal-option h5 {
    margin: 0 0 0.5rem 0;
    color: #1e293b;
    font-size: 0.95rem;
}

.meal-option .meal-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: #6b7280;
}

.meal-option .complexity {
    background: #f1f5f9;
    color: #475569;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    text-transform: capitalize;
}

.no-options {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
    font-style: italic;
}

/* Responsive Planner Styles */
@media (max-width: 768px) {
    .planner-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .week-navigation {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .planning-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .weekly-table th {
        padding: 0.5rem 0.25rem;
        font-size: 0.875rem;
    }
    
    .day-name {
        font-size: 0.875rem;
    }
    
    .day-date {
        font-size: 0.75rem;
    }
    
    .day-cell {
        padding: 0.5rem 0.25rem;
    }
    
    .day-notes {
        font-size: 0.625rem;
        padding: 0.375rem;
        min-height: 50px;
    }
    
    .meal-info h5 {
        font-size: 0.75rem;
    }
    
    .classification-text {
        font-size: 0.5rem;
    }
    
    .complexity-text {
        font-size: 0.5rem;
    }
    
    .meal-actions .btn {
        font-size: 0.625rem;
        padding: 0.125rem 0.375rem;
    }
    
    .empty-meal p {
        font-size: 0.75rem;
    }
    
    .empty-meal .btn {
        font-size: 0.625rem;
        padding: 0.25rem 0.5rem;
    }
    
    .reason-buttons {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .weekly-table-container {
        margin: 0 -15px;
        border-radius: 0;
    }
    
    .weekly-table th {
        padding: 0.375rem 0.125rem;
        font-size: 0.75rem;
    }
    
    .day-cell {
        padding: 0.375rem 0.125rem;
    }
    
    .meal-cell {
        min-height: 140px;
    }
    
    .planned-meal {
        min-height: 120px;
    }
    
    .empty-meal {
        min-height: 120px;
    }
}

/* Inline Weather Styles */
.weather-refresh-btn {
    padding: 0.375rem 0.5rem;
    font-size: 1rem;
    margin-left: 0.5rem;
}

.weather-refresh-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.day-weather {
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.25rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 6px;
}

.weather-icon-small {
    font-size: 1.125rem;
}

.weather-temps-small {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    font-size: 0.75rem;
}

.temp-high-small {
    font-weight: 600;
    color: white;
}

.temp-low-small {
    color: rgba(255, 255, 255, 0.8);
}

.day-weather-loading {
    margin-top: 0.5rem;
    text-align: center;
    opacity: 0.5;
}

.weather-loading-icon {
    font-size: 1rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* Mobile responsiveness for inline weather */
@media (max-width: 768px) {
    .day-weather {
        margin-top: 0.25rem;
        gap: 0.25rem;
        padding: 0.125rem;
    }
    
    .weather-icon-small {
        font-size: 1rem;
    }
    
    .weather-temps-small {
        font-size: 0.7rem;
        gap: 0.125rem;
    }
    
    .weather-refresh-btn {
        padding: 0.25rem 0.375rem;
        font-size: 0.875rem;
        margin-left: 0.25rem;
    }
}

@media (max-width: 480px) {
    .day-weather {
        flex-direction: column;
        gap: 0.125rem;
        padding: 0.125rem;
    }
    
    .weather-icon-small {
        font-size: 0.875rem;
    }
    
    .weather-temps-small {
        font-size: 0.65rem;
    }
}