/* Cart Widget CSS */
#dipner-cart-wrapper {
    position: fixed;
    bottom: 30px;
    right: 110px;
    /* offset from chat widget */
    z-index: 1000;
    font-family: 'Inter', sans-serif;
}

#dipner-cart-toggle {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: var(--chat-header-gradient, linear-gradient(135deg, #008060 0%, #00b386 100%));
    border: none;
    color: white;
    box-shadow: 0 5px 15px rgba(0, 128, 96, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

#dipner-cart-toggle:hover {
    transform: scale(1.1);
}

#dipner-cart-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 500px;
    max-height: 80vh;
    background: var(--chat-bg-window, #ffffff);
    border-radius: 20px;
    box-shadow: var(--chat-shadow, 0 10px 30px rgba(0, 0, 0, 0.15));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease;
    transform-origin: bottom right;
}

#dipner-cart-window.hidden {
    opacity: 0;
    transform: scale(0.9);
    pointer-events: none;
}

#dipner-cart-header {
    padding: 15px 20px;
    background: var(--chat-header-gradient, linear-gradient(135deg, #008060 0%, #00b386 100%));
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#dipner-cart-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    line-height: 1;
}

#dipner-cart-close:hover {
    opacity: 1;
}

#dipner-cart-items {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: var(--chat-bg-messages, #f8f9fa);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Global Modal Styles (for Cart & Success Modals) */
.calc-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.calc-modal-overlay.active {
    display: flex;
}

.calc-modal-content {
    background: #fff;
    position: relative;
    overflow-y: auto;
    max-height: 95vh;
    border-radius: 12px;
}

.calc-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    cursor: pointer;
    color: #333;
    line-height: 1;
}

.calc-modal-close:hover {
    color: #ff8c00;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    #dipner-cart-wrapper {
        bottom: 20px;
        right: 95px;
        /* offset from mobile chat widget */
    }

    #dipner-cart-window {
        bottom: 0;
        right: -75px;
        /* attempt to map to screen size */
        width: 100vw;
        height: 100vh;
        max-height: none;
        border-radius: 0;
        position: fixed;
        right: 0;
    }
}