/* Additional component styles */

/* Loading spinner */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Pull to refresh indicator */
.ptr-indicator {
    text-align: center;
    padding: 16px;
    color: var(--text-light);
    font-size: 13px;
}

/* Date range picker */
.date-range-picker {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--card);
    margin: 12px 16px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.date-range-picker input {
    flex: 1;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
}

.date-range-picker span {
    color: var(--text-light);
}

/* Confirm dialog */
.confirm-dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 16px;
}

.confirm-content {
    background: var(--card);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    max-width: 300px;
}

.confirm-content p {
    margin-bottom: 20px;
    font-size: 15px;
}

.confirm-actions {
    display: flex;
    gap: 12px;
}

.confirm-actions button {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
}

.confirm-cancel {
    background: var(--border);
    border: none;
    color: var(--text);
}

.confirm-ok {
    background: var(--primary);
    border: none;
    color: white;
}

.confirm-danger .confirm-ok {
    background: var(--danger);
}

/* Ingredient chips */
.ingredient-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.ingredient-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: var(--background);
    border-radius: 16px;
    font-size: 13px;
}

.ingredient-chip .remove {
    margin-left: 6px;
    cursor: pointer;
    color: var(--text-light);
}

/* Stats summary cards */
.stats-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 16px;
}

.stats-summary-card {
    background: var(--background);
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}

.stats-summary-card .value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.stats-summary-card .label {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
}

/* Meal type icons */
.meal-icon {
    font-size: 16px;
    margin-right: 4px;
}

.meal-icon-breakfast::before { content: '🌅'; }
.meal-icon-lunch::before { content: '☀️'; }
.meal-icon-dinner::before { content: '🌙'; }
.meal-icon-snack::before { content: '🍎'; }
.meal-icon-supper::before { content: '🍔'; }

/* Portion indicators */
.portion-indicator {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    color: var(--text-light);
}

.portion-indicator.small::before { content: '🔸'; }
.portion-indicator.normal::before { content: '🔶'; }
.portion-indicator.large::before { content: '🔷'; }

/* Swipe actions hint */
.swipe-hint {
    font-size: 11px;
    color: var(--text-hint);
    text-align: center;
    padding: 8px;
}

/* Offline indicator */
.offline-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--warning);
    color: white;
    text-align: center;
    padding: 8px;
    font-size: 13px;
    z-index: 1500;
    transform: translateY(-100%);
    transition: transform 0.3s;
}

.offline-indicator.show {
    transform: translateY(0);
}

/* Export options */
.export-options {
    padding: 16px;
}

.export-option {
    display: flex;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.export-option:hover {
    border-color: var(--primary);
}

.export-option input {
    margin-right: 12px;
}

.export-option .format-icon {
    font-size: 24px;
    margin-right: 12px;
}

.export-option .format-info h4 {
    font-size: 14px;
    margin-bottom: 2px;
}

.export-option .format-info p {
    font-size: 12px;
    color: var(--text-light);
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-up {
    animation: slideUp 0.3s ease;
}

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

/* Empty state */
.empty-state {
    text-align: center;
    padding: 40px 20px;
}

.empty-state .icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    color: var(--text-light);
}

/* Quick add buttons */
.quick-adds {
    padding: 0 16px 16px;
}

.quick-add-title {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.quick-add-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.quick-add-btn {
    padding: 6px 12px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 16px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-add-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary);
}
