/**
 * Rotating Meals Menu - Customer Styles
 */

/* Container */
.rmm-customer-container {
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    
}

/* Subscription Info */
.rmm-subscription-info {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 20px;
    gap: 20px;
}

.rmm-info-box {
    flex: 1;
    min-width: 250px;
    padding: 15px;
    background: #f8f8f8;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.rmm-info-box h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 16px;
    color: #333;
}

.rmm-meals-count {
    font-weight: bold;
    color: #0073aa;
}

.rmm-cutoff-date {
    font-weight: bold;
    color: #d63638;
}

.rmm-cutoff-note {
    font-size: 14px;
    margin-top: 5px;
    color: #666;
}

/* Tabs */
.rmm-tabs-header {
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.rmm-tabs {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.rmm-tabs li {
    margin: 0;
    padding: 0;
}

.rmm-tabs a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: #666;
    border: 1px solid transparent;
    border-bottom: none;
    margin-bottom: -1px;
    background: #f8f8f8;
}

.rmm-tabs li.active a {
    background: #fff;
    border-color: #ddd;
    border-bottom-color: #fff;
    color: #0073aa;
}

.rmm-tabs a:hover {
    background: #f0f0f0;
    color: #0073aa;
}

.rmm-tab-content {
    display: none;
    padding: 20px 0;
}

.rmm-tab-content.active {
    display: block;
}

/* Meal Builder */
.rmm-meal-builder {
    margin-top: 20px;
}

.rmm-selection-status {
    margin-bottom: 20px;
}

.rmm-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.rmm-status-count {
    font-weight: bold;
}

.rmm-progress-bar {
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.rmm-progress {
    height: 100%;
    background: #0073aa;
    transition: width 0.3s ease;
}

/* Meal Search */
.rmm-meal-search {
    margin-bottom: 20px;
}

.rmm-search-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* Columns Layout */
.rmm-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.rmm-column-left {
    flex: 7;
    min-width: 300px;
}

.rmm-column-right {
    flex: 3;
    min-width: 250px;
}

/* Available Meals */
.rmm-available-meals {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.rmm-meal-card {
    position: relative;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    /* Remove animation */
    transition: none;
}

.rmm-meal-card:hover {
    /* Remove animations */
    transform: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.rmm-meal-card.selected {
    background-color: #fafbfc;
    border: 2px solid #0073aa;
    box-shadow: 0 8px 25px rgba(0, 115, 170, 0.25);
}

.rmm-meal-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.rmm-meal-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(to top, rgba(0,0,0,0.4), transparent);
    opacity: 0;
    /* Remove animation */
    transition: none;
}

.rmm-meal-card:hover .rmm-meal-image::after {
    opacity: 0; /* Keep hidden */
}

.rmm-meal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Remove animation */
    transition: none;
}

.rmm-meal-card:hover .rmm-meal-image img {
    /* Remove animation */
    transform: none;
}

.rmm-meal-details {
    padding: 20px;
}

.rmm-meal-details h4 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    /* Remove animation */
    transition: none;
    position: relative;
}

.rmm-meal-card:hover .rmm-meal-details h4 {
    color: #333; /* Keep original color */
}

.rmm-meal-details h4::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0; /* Keep hidden by default */
    height: 2px;
    background: #000000;
    /* Remove animation */
    transition: none;
}

.rmm-meal-card:hover .rmm-meal-details h4::after {
    width: 0; /* Keep hidden */
}

.rmm-default-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff9800;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.rmm-meal-nutrition {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.rmm-nutrition-item {
    background: #F3F4F6;
    color: #1F2937;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    transition: none;
}


.rmm-meal-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
    max-height: 65px;
    overflow: hidden;
    position: relative;
    transition: none;
}

.rmm-meal-card:hover .rmm-meal-description {
    color: #666;
}

.rmm-meal-description::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 30%;
    height: 20px;
    background: linear-gradient(to right, transparent, #fff);
}

.rmm-meal-actions {
    padding: 15px 20px;
    border-top: 1px solid rgba(0,0,0,0.06);
    text-align: right;
    background: #fafbfc;
    transition: none;
}



.rmm-add-meal, .rmm-remove-meal {
    border: none;
    background: #000000;
    color: white;
    border-radius: 30px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: none;
    box-shadow: 0 2px 6px rgba(0, 115, 170, 0.3);
}

.rmm-remove-meal {
    background: #d63638;
    box-shadow: 0 2px 6px rgba(214, 54, 56, 0.3);
}

.rmm-add-meal:hover {
    background: #303334;
    transform: none;
    box-shadow: 0 2px 6px rgba(0, 115, 170, 0.3);
}

.rmm-remove-meal:hover {
    background: #b32d2e;
    transform: none;
    box-shadow: 0 2px 6px rgba(214, 54, 56, 0.3);
}

.rmm-add-meal:active, .rmm-remove-meal:active {
    transform: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.rmm-add-meal:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.rmm-closed-label {
    font-size: 14px;
    color: #666;
    font-style: italic;
}

/* Selected Meals */
.rmm-selected-meals {
    background: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 20px;
}

.rmm-selection-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.rmm-selection-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.rmm-selection-item:last-child {
    border-bottom: none;
}

.rmm-selection-name {
    font-weight: 500;
}

.rmm-remove-selection {
    background: none;
    border: none;
    color: #d63638;
    cursor: pointer;
    font-size: 16px;
}

.rmm-remove-selection:hover {
    /* Keep the same color on hover to prevent color change */
    color: #ff0004;
    background: transparent;
    border: none;
    box-shadow: none;
}

/* Nutritional Summary */
.rmm-nutritional-summary {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.rmm-nutritional-summary h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 15px;
}

.rmm-nutrition-summary-data {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.rmm-nutrition-summary-item {
    font-size: 14px;
}

.rmm-nutrition-label {
    display: block;
    color: #666;
    margin-bottom: 3px;
}

.rmm-nutrition-value {
    font-weight: bold;
    color: #333;
}

/* Selection Actions */
.rmm-selection-actions {
    text-align: center;
    margin-top: 20px;
}

.rmm-save-selection {
    width: 100%;
}

.rmm-selection-note {
    margin-top: 10px;
    font-size: 14px;
    color: #666;
}

.rmm-selection-locked {
    background: #f8d7da;
    color: #721c24;
    padding: 10px 15px;
    border-radius: 4px;
    margin-top: 20px;
    text-align: center;
}

.rmm-remaining {
    font-weight: bold;
}

/* Loader */
.rmm-loading {
    text-align: center;
    padding: 30px;
}

.rmm-loading::after {
    content: '';
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid #ddd;
    border-radius: 50%;
    border-top-color: #0073aa;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

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

/* Error Messages */
.rmm-error {
    padding: 15px;
    background: #f8d7da;
    color: #721c24;
    border-radius: 4px;
}

/* No Subscription */
.rmm-no-subscription {
    text-align: center;
    padding: 40px 20px;
    background: #f8f8f8;
    border-radius: 5px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .rmm-column-left, 
    .rmm-column-right {
        flex: 100%;
    }
    
    .rmm-available-meals {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
    
    .rmm-tabs {
        flex-direction: column;
    }
    
    .rmm-tabs li {
        margin-bottom: -1px;
    }
    
    .rmm-tabs li.active a {
        border-bottom-color: #ddd;
    }
}

/* Status Messages */
.rmm-message {
    padding: 10px 15px;
    margin-bottom: 15px;
    border-radius: 4px;
}

.rmm-message.success {
    background: #d4edda;
    color: #155724;
}

.rmm-message.error {
    background: #f8d7da;
    color: #721c24;
}

/* Meal History */
.rmm-history-container {
    margin-top: 20px;
}

.rmm-history-item {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f8f8;
    border-radius: 5px;
}

.rmm-history-item h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 16px;
}

.rmm-history-meals {
    margin-top: 10px;
}

.rmm-history-meal {
    padding: 10px;
    background: white;
    border-radius: 3px;
    margin-bottom: 5px;
}

.rmm-history-meal:last-child {
    margin-bottom: 0;
}

.rmm-status {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    color: white;
    margin-left: 8px;
}

.rmm-status-pending {
    background: #ffd54f;
    color: #333;
}

.rmm-status-completed {
    background: #4caf50;
}

.rmm-status-locked {
    background: #2196f3;
}

.rmm-status-defaulted {
    background: #ff9800;
}

.rmm-no-history {
    text-align: center;
    padding: 40px 20px;
    background: #f8f8f8;
    border-radius: 5px;
}

/* Basic Information Form Responsive Styles */
.rmm-checkout-form {
    width: 100%;
}

.rmm-checkout-description {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
}

/* Responsive form layout */
@media (max-width: 768px) {
    .rmm-checkout-container {
        width: 100%;
        padding: 15px;
    }
    
    .rmm-step-content h1 {
        font-size: 24px;
    }
    
    .rmm-checkout-description {
        font-size: 14px;
    }
    
    .rmm-form-field input,
    .rmm-form-field select,
    .rmm-form-field textarea {
        font-size: 14px;
    }
}

/* Responsive checkbox styles */
@media (max-width: 480px) {
    .dietary-checkbox,
    .allergy-checkbox {
        padding: 8px;
    }
    
    .dietary-checkbox label,
    .allergy-checkbox label {
        font-size: 13px;
    }
    
    .rmm-form-section h3 {
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    .rmm-section-description {
        margin-bottom: 15px;
    }
    
    .other-allergies textarea {
        min-height: 60px;
    }
    
    .rmm-form-navigation {
        flex-direction: column;
        gap: 10px;
    }
    
    .rmm-form-navigation .back-btn,
    .rmm-form-navigation .continue-btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
} 

/* Meal Filter Categories */
.rmm-meal-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
}

.rmm-category-filter {
    padding: 10px 20px;
    border-radius: 30px;
    border: 1px solid #e0e0e0;
    background: white;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.rmm-category-filter.active {
    background: #000;
    color: white;
    border-color: #000;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.rmm-category-filter:hover:not(.active) {
    border-color: #0073aa;
    color: #0073aa;
    transform: translateY(-3px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

.rmm-category-filter.low-carb {
    border-color: #8bc34a;
    color: #689f38;
}

.rmm-category-filter.low-carb.active {
    background: #8bc34a;
    color: white;
    border-color: #8bc34a;
}

.rmm-category-filter.gluten-free {
    border-color: #ff9800;
    color: #f57c00;
}

.rmm-category-filter.gluten-free.active {
    background: #ff9800;
    color: white;
    border-color: #ff9800;
}

.rmm-category-filter.keto {
    border-color: #9c27b0;
    color: #7b1fa2;
}

.rmm-category-filter.keto.active {
    background: #9c27b0;
    color: white;
    border-color: #9c27b0;
}

.rmm-category-filter.protein {
    border-color: #f44336;
    color: #d32f2f;
}

.rmm-category-filter.protein.active {
    background: #f44336;
    color: white;
    border-color: #f44336;
}

.rmm-category-filter.vegetarian {
    border-color: #4caf50;
    color: #388e3c;
}

.rmm-category-filter.vegetarian.active {
    background: #4caf50;
    color: white;
    border-color: #4caf50;
}

/* Meal Search Bar */
.rmm-meal-search {
    position: relative;
    margin-bottom: 30px;
}

.rmm-search-input {
    width: 100%;
    padding: 12px 20px;
    padding-right: 45px;
    border: 1px solid #e0e0e0;
    border-radius: 30px;
    font-size: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.rmm-search-input:focus {
    border-color: #0073aa;
    box-shadow: 0 4px 12px rgba(0,115,170,0.15);
    outline: none;
}

.rmm-search-input::placeholder {
    color: #aaa;
}

/* Sort dropdown */
.rmm-sort-dropdown {
    position: relative;
    display: inline-block;
    margin-bottom: 25px;
}

.rmm-sort-button {
    padding: 8px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: white;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.rmm-sort-button:hover {
    border-color: #0073aa;
    color: #0073aa;
}

.rmm-sort-button svg {
    width: 12px;
    height: 12px;
    transition: transform 0.3s ease;
}

.rmm-sort-button:hover svg {
    transform: translateY(2px);
}

/* Animation for category filters */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.rmm-category-filter.active {
    animation: pulse 1s infinite;
    animation-iteration-count: 1;
} 

/* Meal controls container - flex container for quantity controls and remove button */
.rmm-meal-controls-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 10px;
}

.rmm-meal-quantity-control,
.rmm-meal-quantity-control * {
    pointer-events: auto;
}

.rmm-meal-controls-container .rmm-meal-quantity-control {
    margin-bottom: 0;
    margin-right: 10px;
    position: relative;
    z-index: 5; /* Ensure controls are above card */
}

.rmm-meal-controls-container .rmm-remove-meal {
    min-width: 80px;
    position: relative;
    z-index: 5; /* Ensure button is above card */
}

/* Ensure controls appear above card */
.rmm-meal-actions {
    position: relative;
    z-index: 5;
}

/* Meal quantity controls */
.rmm-meal-quantity-control {
    display: flex;
    align-items: center;
    background-color: #f9fafb;
    border-radius: 30px;
    padding: 10px;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
    justify-content: center;
}

.rmm-qty-decrease,
.rmm-qty-increase {
    width: 28px;
    height: 28px;
    /* border-radius: 50%; */
    border: none;
    background-color: #f9fafb;
    color: #4b5563;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    /* transition: all 0.2s ease; */
}

/* .rmm-qty-decrease:hover:not(:disabled),
.rmm-qty-increase:hover:not(:disabled) {
    background-color: #e5e7eb;
} */

.rmm-qty-decrease:disabled,
.rmm-qty-increase:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.rmm-qty-value {
    min-width: 24px;
    text-align: center;
    font-weight: 500;
    font-size: 14px;
}

/* Quantity badge */
.rmm-meal-quantity-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: #10b981;
    color: white;
    font-size: 12px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 12px;
    z-index: 2;
}

/* Make sure Font Awesome icons are properly aligned */
.rmm-qty-decrease .fas,
.rmm-qty-increase .fas {
    width: 16px;
    height: 16px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
} 

/* Selection quantity styles */
.rmm-selection-quantity {
    font-size: 0.9em;
    color: #666;
    font-weight: 500;
}

.rmm-selection-quantity-controls {
    display: flex;
    align-items: center;
    margin-right: 10px;
}

.rmm-selection-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rmm-selection-item .rmm-qty-decrease,
.rmm-selection-item .rmm-qty-increase {
    width: 22px;
    height: 22px;
    background-color: #f3f4f6;
}

.rmm-selection-item .rmm-qty-value {
    min-width: 20px;
    font-size: 12px;
} 