/* Modern Modal Dialog for Cart Operations */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-dialog {
    background: white;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    max-width: 400px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95);
    transition: transform 0.2s ease;
}

.modal-overlay.show .modal-dialog {
    transform: scale(1);
}

.modal-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid #f2f9f1;
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #142a0f;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-body {
    padding: 16px 24px 24px;
}

.modal-message {
    font-size: 16px;
    line-height: 1.5;
    color: #566947;
    margin: 0;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.modal-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.modal-btn-secondary {
    background: #f9fcf8;
    color: #758b64;
    border: 1px solid #e3f0e2;
}

.modal-btn-secondary:hover {
    background: #f2f9f1;
    border-color: #d2e1cb;
}

.modal-btn-danger {
    background: #58ef44;
    color: white;
}

.modal-btn-danger:hover {
    background: #2cdc26;
}

.modal-btn-primary {
    background: #70f63b;
    color: white;
}

.modal-btn-primary:hover {
    background: #35eb25;
}

.modal-icon {
    font-size: 24px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.modal-icon.danger {
    background: #f5fef2;
    color: #58ef44;
}

.modal-icon.warning {
    background: #f0ffeb;
    color: #3af50b;
}

.modal-icon.success {
    background: #f0fdf4;
    color: #22c55e;
}

.modal-icon.info {
    background: #f4ffef;
    color: #70f63b;
}

/* Mobile responsive */
@media (max-width: 640px) {
    .modal-dialog {
        margin: 16px;
        max-width: none;
        width: auto;
    }

    .modal-header,
    .modal-body {
        padding-left: 20px;
        padding-right: 20px;
    }

    .modal-actions {
        flex-direction: column;
    }

    .modal-btn {
        flex: none;
    }
}