/**
 * Order Summary Custom Styles
 * Remove button and enhancements
 */

/* Remove Button (X) */
.f4f-order-summary__remove-btn {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    width: 24px !important;
    height: 24px !important;
    padding: 4px !important;
    background: rgba(0, 0, 0, 0.05) !important;
    border: none !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    z-index: 10 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.f4f-order-summary__remove-btn:hover {
    background: rgba(220, 53, 69, 0.1);
    transform: scale(1.1);
}

.f4f-order-summary__remove-btn:hover svg {
    color: #dc3545;
}

.f4f-order-summary__remove-btn svg {
    color: #666;
    transition: color 0.2s ease;
}

.f4f-order-summary__remove-btn:active {
    transform: scale(0.95);
}

/* Ensure meal item has relative positioning for absolute button */
.f4f-order-summary__meal-item {
    position: relative !important;
}

/* Add smooth fade-out animation when removing */
.f4f-order-summary__meal-item.removing {
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s ease;
    pointer-events: none;
}

/* ===================================
   GROUP STYLES (Signature, Custom, Bulk, Additional)
   =================================== */

.f4f-order-summary__group {
    margin-bottom: 24px;
}

.f4f-order-summary__group:last-child {
    margin-bottom: 0;
}

.f4f-order-summary__group-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.f4f-order-summary__group-counter {
    font-size: 13px;
    font-weight: 500;
    color: #666;
    margin-left: 8px;
}

.f4f-order-summary__group-meals {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ===================================
   BULK MEALS: DISABLED +/- BUTTONS
   =================================== */

/* Disable +/- buttons for bulk meals (complex weight logic) */
.f4f-order-summary__meal-item[data-meal-type="bulk_meal"] .f4f-order-summary__counter-btn,
.f4f-order-summary__meal-item[data-meal-type="bulk_meal"] .f4f-order-summary__edit-meal {
    opacity: 0.3 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

/* Add visual indication that bulk meal buttons are disabled */
.f4f-order-summary__meal-item[data-meal-type="bulk_meal"] .f4f-order-summary__counter {
    position: relative;
}

.f4f-order-summary__meal-item[data-meal-type="bulk_meal"] .f4f-order-summary__counter::after {
    content: "Weight cannot be changed here";
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 20;
}

.f4f-order-summary__meal-item[data-meal-type="bulk_meal"] .f4f-order-summary__counter:hover::after {
    opacity: 1;
}

/* ===================================
   BULK MEALS: HORIZONTAL WEIGHT + PRICE LAYOUT
   =================================== */

/* Horizontal container for weight and price */
.f4f-order-summary__bulk-meal-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 8px;
    padding: 8px 0;
}

/* Weight display (left side) */
.f4f-order-summary__bulk-meal-weight {
    font-size: 14px;
    font-weight: 500;
    color: #666;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

/* Price display (right side) - consistent with other products */
.f4f-order-summary__bulk-meal-details .f4f-order-summary__meal-price {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-primary-neapolitan);
}
