/**
 * Subscription Meal Manager - Frontend Styles
 */

/* ========================
   MAIN CONTAINER
   ======================== */

.smm-manage-meals {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

.smm-header {
    margin-bottom: 2rem;
    text-align: center;
}

.smm-header h2 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 2rem;
    font-weight: 600;
}

.smm-description {
    color: #666;
    font-size: 1.1rem;
    margin: 0;
    line-height: 1.6;
}

/* ========================
   MULTI-SUBSCRIPTION NOTICE
   ======================== */

.smm-multiple-subscriptions-notice {
    background: linear-gradient(135deg, #e8f4fd 0%, #d1ecf1 100%);
    border: 1px solid #bee5eb;
    border-radius: 8px;
    margin-bottom: 2rem;
    padding: 1.5rem;
}

.smm-notice-content {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.smm-notice-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.smm-notice-text h4,
.smm-notice-text strong {
    color: #0c5460;
    margin: 0 0 0.5rem 0;
}

.smm-notice-text p {
    color: #0c5460;
    margin: 0;
    line-height: 1.5;
}

/* ========================
   SUBSCRIPTION CARDS
   ======================== */

.smm-subscription-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.smm-subscription-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.smm-subscription-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.smm-subscription-info h3 {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-size: 1.3rem;
    font-weight: 600;
}

.smm-subscription-id {
    font-size: 0.9rem;
    color: #666;
    font-weight: normal;
}

.smm-plan-badge {
    background: #007cba;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

.smm-plan-details {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.smm-plan-type,
.smm-subscription-mode {
    background: #f8f9fa;
    color: #495057;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid #e9ecef;
}

.smm-plan-type {
    background: #e7f3ff;
    color: #004085;
    border-color: #b8daff;
}

.smm-subscription-mode {
    background: #f8f9fa;
    color: #495057;
    border-color: #e9ecef;
}

.smm-created-date {
    font-size: 0.85rem;
    color: #666;
}

.smm-subscription-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.smm-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

.smm-status-active {
    background: #d4edda;
    color: #155724;
}

.smm-status-paused,
.smm-status-on-hold {
    background: #fff3cd;
    color: #856404;
}

.smm-status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

.smm-next-payment {
    font-size: 0.9rem;
    color: #666;
}

.smm-meal-summary {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.smm-meal-count {
    font-size: 1.1rem;
    color: #333;
}

.smm-toggle-meals {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 2px solid #007cba;
    background: #007cba;
    color: white;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.smm-toggle-meals:hover {
    background: #005a8b;
    border-color: #005a8b;
    transform: translateY(-1px);
}

.toggle-icon {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

/* ========================
   MEAL SECTION STATES
   ======================== */

.smm-meals-section {
    border-top: 1px solid #e0e0e0;
}

.smm-loading {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.smm-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.smm-error {
    text-align: center;
    padding: 2rem;
    color: #dc3545;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    margin: 1rem;
    border-radius: 8px;
}

.smm-retry-btn {
    margin-top: 1rem;
}

/* ========================
   MEAL INTERFACE
   ======================== */

.smm-meal-interface {
    padding: 1.5rem;
}

.smm-selection-counter {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.smm-counter-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.smm-selected-count {
    color: #007cba;
    font-size: 1.5rem;
}

.smm-max-allowed {
    color: #333;
}

.smm-counter-label {
    color: #666;
    font-weight: normal;
    font-size: 1rem;
}

.smm-progress-bar {
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.smm-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007cba, #0099d4);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Counter states */
.smm-selection-counter.empty {
    border-color: #dee2e6;
}

.smm-selection-counter.partial {
    border-color: #007cba;
    background: linear-gradient(135deg, #e7f3ff 0%, #cce7ff 100%);
}

.smm-selection-counter.full {
    border-color: #28a745;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
}

.smm-selection-counter.full .smm-progress-fill {
    background: linear-gradient(90deg, #28a745, #34ce57);
}

.smm-selection-counter.over-limit {
    border-color: #dc3545;
    background: linear-gradient(135deg, #f8d7da 0%, #f1b0b7 100%);
}

.smm-selection-counter.over-limit .smm-progress-fill {
    background: linear-gradient(90deg, #dc3545, #e74c3c);
}

/* ========================
   MEALS GRID
   ======================== */

.smm-meals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.smm-meal-card {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.smm-meal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(27, 156, 133, 0.03), rgba(126, 198, 183, 0.03));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

.smm-meal-card:hover {
    border-color: #1B9C85;
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(27, 156, 133, 0.2);
}

.smm-meal-card:hover::before {
    opacity: 1;
}

.smm-meal-card.selected {
    border-color: #1B9C85;
    background: linear-gradient(135deg, #ffffff 0%, #f8fcfa 100%);
    box-shadow: 0 8px 30px rgba(27, 156, 133, 0.25);
    position: relative;
}

.smm-meal-card.selected::after {
    content: '✓';
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #1B9C85, #7EC6B7);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    z-index: 4;
    animation: selectedBounce 0.5s ease-out;
    box-shadow: 0 4px 15px rgba(27, 156, 133, 0.4);
}

@keyframes selectedBounce {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.smm-chefs-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: linear-gradient(135deg, #ff6b35, #ff8c42);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 700;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
    animation: pulse-chef 3s ease-in-out infinite;
}

@keyframes pulse-chef {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
    }
}

.smm-meal-image {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8fcfa, #e8f4f0);
}

.smm-meal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.4s ease;
    filter: brightness(1.05) contrast(1.02);
}

.smm-meal-card:hover .smm-meal-image img {
    transform: scale(1.08);
    filter: brightness(1.1) contrast(1.05);
}

.smm-meal-info {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(27, 156, 133, 0.9);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: 600;
    z-index: 3;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(27, 156, 133, 0.3);
}

.smm-meal-info:hover {
    background: rgba(27, 156, 133, 1);
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 6px 20px rgba(27, 156, 133, 0.4);
}

.smm-meal-tags {
    padding: 0.75rem 1rem 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    position: relative;
    z-index: 2;
}

.smm-meal-tag {
    background: linear-gradient(135deg, #e8f4f0, #d4edda);
    color: #1B9C85;
    padding: 0.4rem 0.75rem;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(27, 156, 133, 0.2);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.smm-meal-tag:hover {
    background: linear-gradient(135deg, #1B9C85, #7EC6B7);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(27, 156, 133, 0.3);
}

.smm-meal-content {
    padding: 1.25rem;
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.95);
}

.smm-meal-title {
    margin: 0 0 0.75rem 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.3;
    background: linear-gradient(135deg, #1B9C85, #7EC6B7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
}

.smm-meal-card:hover .smm-meal-title {
    transform: translateY(-1px);
}

.smm-meal-description {
    margin: 0 0 1.25rem 0;
    color: #6b7280;
    font-size: 0.95rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 400;
}

.smm-meal-macros {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding: 0.75rem;
    background: linear-gradient(135deg, #f8fcfa, #ffffff);
    border-radius: 12px;
    border: 1px solid rgba(27, 156, 133, 0.1);
}

.smm-macro {
    text-align: center;
    padding: 0.75rem 0.5rem;
    background: white;
    border-radius: 8px;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(27, 156, 133, 0.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.smm-macro:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(27, 156, 133, 0.15);
    border-color: rgba(27, 156, 133, 0.3);
}

.smm-macro strong {
    display: block;
    color: #1B9C85;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.smm-macro span {
    color: #6b7280;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.7rem;
}

/* ========================
   MEAL QUANTITY SECTION
   ======================== */

.smm-meal-quantity-section {
    margin: 12px;
    margin-top: auto; /* Push to bottom of card */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 48px; /* Consistent height for all states */
    position: relative;
}

/* Add Button - Full Width */
.smm-add-meal-btn {
    background: linear-gradient(135deg, #1B9C85 0%, #159c85 50%, #0e8571 100%);
    color: white;
    border: none;
    padding: 6px 24px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    box-shadow: 
        0 4px 15px rgba(27, 156, 133, 0.25),
        0 2px 4px rgba(27, 156, 133, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    width: 100%;
    overflow: hidden;
    position: relative;
}

/* Hide add button when quantity controls are visible */
.smm-meal-quantity-section:has(.smm-meal-quantity-controls.visible) .smm-add-meal-btn {
    display: none !important;
}

/* Fallback for browsers that don't support :has() - CRITICAL */
.smm-add-meal-btn.hidden {
    display: none !important;
}

/* Ensure add button is visible by default */
.smm-add-meal-btn {
    display: block;
}

.smm-add-meal-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.smm-add-meal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px rgba(27, 156, 133, 0.3),
        0 4px 10px rgba(14, 133, 113, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    background: linear-gradient(135deg, #1B9C85 0%, #159c85 50%, #0e8571 100%);
}

.smm-add-meal-btn:hover::before {
    left: 100%;
}

.smm-add-meal-btn:active {
    transform: translateY(-1px);
    transition: all 0.1s ease;
}

/* Quantity Controls Container - Full Width */
.smm-meal-quantity-controls {
    display: none; /* Initially hidden, shown when meal is added */
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border: 2px solid #e2e8f0;
    border-radius: 40px;
    padding: 2px 12px;
    backdrop-filter: blur(10px);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.05),
        0 2px 4px rgba(0, 0, 0, 0.03),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    width: 100%;
    z-index: 3;
    animation: slideInUp 0.4s ease-out;
}

/* Show quantity controls when meal has quantity */
.smm-meal-quantity-controls.visible {
    display: flex !important;
}

/* Ensure quantity controls are hidden by default */
.smm-meal-quantity-controls:not(.visible) {
    display: none !important;
}

.smm-meal-quantity-controls:hover {
    border-color: #cbd5e1;
    box-shadow: 
        0 6px 16px rgba(0, 0, 0, 0.08),
        0 3px 6px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* Animation for quantity controls appearing */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Quantity Buttons - Optimized for full-width layout */
.smm-quantity-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 
        0 2px 8px rgba(16, 185, 129, 0.2),
        0 1px 2px rgba(16, 185, 129, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    user-select: none;
    flex-shrink: 0;
}

.smm-quantity-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.smm-quantity-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 
        0 4px 16px rgba(16, 185, 129, 0.3),
        0 2px 4px rgba(16, 185, 129, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg, #0f766e 0%, #047857 100%);
}

.smm-quantity-btn:hover::after {
    opacity: 1;
}

.smm-quantity-btn:active {
    transform: translateY(-1px) scale(1);
    transition: all 0.1s ease;
}

.smm-quantity-btn.decrease {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 
        0 2px 8px rgba(239, 68, 68, 0.2),
        0 1px 2px rgba(239, 68, 68, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.smm-quantity-btn.decrease:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 
        0 4px 16px rgba(239, 68, 68, 0.3),
        0 2px 4px rgba(239, 68, 68, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Quantity Display - Enhanced for full-width layout */
.smm-meal-quantity-display {
    font-size: 16px;
    font-weight: 700;
    color: #374151;
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    border: 2px solid #e5e7eb;
    border-radius: 20px;
    padding: 4px 16px;
    min-width: 40px;
    text-align: center;
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    flex-grow: 1;
    margin: 0 8px;
}

.smm-meal-quantity-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(27, 156, 133, 0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.smm-meal-card.selected .smm-meal-quantity-display::before {
    animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}



/* ========================
   ACTION BUTTONS
   ======================== */

.smm-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 0 0;
    border-top: 1px solid #e0e0e0;
    margin-top: 2rem;
}

.smm-save-btn {
    background: #28a745;
    color: white;
    border: 2px solid #28a745;
    padding: 0.75rem 2rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.smm-save-btn:hover:not(:disabled) {
    background: #218838;
    border-color: #1e7e34;
    transform: translateY(-1px);
}

.smm-save-btn:disabled {
    background: #6c757d;
    border-color: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.smm-save-btn.saved {
    background: #17a2b8;
    border-color: #138496;
}

.smm-cancel-btn {
    background: transparent;
    color: #6c757d;
    border: 2px solid #6c757d;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.smm-cancel-btn:hover {
    background: #6c757d;
    color: white;
}

.smm-save-status {
    margin-left: auto;
    font-weight: 500;
}

/* ========================
   MODAL STYLES
   ======================== */

.smm-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.smm-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    cursor: pointer;
}

.smm-modal-container {
    position: relative;
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.smm-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.smm-modal-title {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
    color: #333;
}

.smm-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.smm-modal-close:hover {
    background: #f8f9fa;
    color: #333;
}

.smm-modal-content {
    padding: 1.5rem;
}

.smm-modal-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.smm-modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.smm-modal-description,
.smm-modal-content-text {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.smm-modal-macros {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.smm-modal-macros .smm-macro {
    text-align: center;
    background: white;
    padding: 1rem;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.smm-modal-macros .smm-macro strong {
    font-size: 1.2rem;
    color: #007cba;
}

.smm-modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.smm-tag {
    background: #007cba;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* ========================
   EMPTY STATE
   ======================== */

.smm-no-subscriptions {
    text-align: center;
    padding: 4rem 2rem;
}

.smm-empty-state {
    max-width: 400px;
    margin: 0 auto;
}

.smm-empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.smm-empty-state h3 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.5rem;
}

.smm-empty-state p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 2rem;
}

/* ========================
   RESPONSIVE DESIGN
   ======================== */

@media (max-width: 768px) {
    .smm-multiple-subscriptions-notice {
        margin-bottom: 1.5rem;
        padding: 1rem;
    }
    
    .smm-notice-content {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .smm-notice-icon {
        align-self: flex-start;
    }
    
    .smm-subscription-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem;
    }
    
    .smm-plan-details {
        gap: 0.5rem;
        margin-bottom: 0.75rem;
    }
    
    .smm-subscription-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .smm-meal-summary {
        width: 100%;
        justify-content: space-between;
        margin-top: 1rem;
    }
    
    .smm-meals-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .smm-meal-macros {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .smm-meal-image {
        height: 180px;
    }
    
    .smm-chefs-badge {
        top: 0.5rem;
        left: 0.5rem;
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
    }
    
    .smm-meal-info {
        top: 0.5rem;
        right: 0.5rem;
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .smm-meal-content {
        padding: 1rem;
    }
    
    .smm-meal-actions {
        padding: 1rem;
    }
    
    .smm-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .smm-save-btn,
    .smm-cancel-btn {
        width: 100%;
        text-align: center;
    }
    
    .smm-modal-container {
        width: 95%;
        margin: 1rem;
        max-height: 90vh;
    }
    
    .smm-modal-macros {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .smm-header h2 {
        font-size: 1.5rem;
    }
    
    .smm-description {
        font-size: 1rem;
    }
    
    .smm-subscription-header {
        padding: 1rem;
    }
    
    .smm-meal-interface {
        padding: 1rem;
    }
    
    .smm-selection-counter {
        padding: 0.75rem 1rem;
    }
    
    .smm-counter-content {
        font-size: 1rem;
    }
    
    .smm-selected-count {
        font-size: 1.3rem;
    }
    
    .smm-meal-macros {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        padding: 0.5rem;
    }
    
    .smm-macro {
        padding: 0.5rem 0.25rem;
        font-size: 0.75rem;
    }
    
    .smm-macro strong {
        font-size: 1rem;
    }
    
    .smm-quantity-controls {
        gap: 0.5rem;
    }
    
    .smm-quantity-decrease,
    .smm-quantity-increase {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
    
    .smm-quantity-display {
        font-size: 1.2rem;
        min-width: 2.5rem;
        padding: 0.4rem 0.75rem;
    }
    

}

/* ========================
   UTILITY CLASSES
   ======================== */

.smm-hidden {
    display: none !important;
}

.smm-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Prevent body scroll when modal is open */
body.smm-modal-open {
    overflow: hidden;
}

/* Changes Disabled State */
.smm-changes-disabled {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    margin: 20px 0;
}

.smm-changes-disabled h3 {
    color: #d63638;
    margin-top: 0;
    font-size: 18px;
}

.smm-changes-disabled p {
    color: #666;
    margin-bottom: 0;
    font-size: 14px;
}